Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SwipeView shows neighbor pages even if they are not current page

SwipeView shows neighbor pages even if they are not current page

Scheduled Pinned Locked Moved Solved QML and Qt Quick
quick controlsswipeview
3 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lollypolly
    wrote on 8 Aug 2016, 20:51 last edited by
    #1

    Hello. I am trying to use SwipeView as area for image previews, everything works as expected, but SwipeView shows neighbor page even if that page is not active page, here is screenshot. So, code for SwipeView:

        SwipeView {
            background: Rectangle {
                anchors.fill: parent
                color: "lightsteelblue"
            }
            id: previews
            anchors.top: parent.top; anchors.left: parent.left;
            width: 130
            height: 180
            Repeater {
                model: imgModel
                Image {
                    fillMode: Image.PreserveAspectFit
                    source: src
                }
            }
        }
    

    As far as you can see, it is limited to 130x180. Anyone know how to fix this?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jpnurmi
      wrote on 8 Aug 2016, 21:06 last edited by
      #2

      SwipeView does not clip by default. You can set clip: true in cases when it is needed.

      http://doc.qt.io/qt-5/qtquick-performance.html#clipping

      1 Reply Last reply
      1
      • L Offline
        L Offline
        lollypolly
        wrote on 8 Aug 2016, 21:20 last edited by
        #3

        @jpnurmi, thanks a lot, already found this property. But had limit in 300 seconds to reply. Seems like u are guru of QML :)

        1 Reply Last reply
        0

        2/3

        8 Aug 2016, 21:06

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved