Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Swipeview Within Loader Issue

    QML and Qt Quick
    1
    1
    138
    Loading More Posts
    • 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.
    • K
      kengineer last edited by

      I am trying to use a Swipeview component within a Loader component. I am finding that when used within the Loader, the Swipeview appears but does not allow me to actually swipe between items. See examples below:

      Swipes:

      SwipeView {
          currentIndex: 1
          anchors.fill: parent
          Item {
              Rectangle {
                  width: 50
                  height: 50
                  color: "Blue"
              }
          }
          Item {
              Rectangle {
                  width: 50
                  height: 50
                  color: "Red"
              }
          }
      }
      

      Does not swipe:

          Loader {
              sourceComponent: swipe
          }
      
          Component {
              id: swipe
              SwipeView {
                  currentIndex: 1
                  anchors.fill: parent
                  Item {
                      Rectangle {
                          width: 50
                          height: 50
                          color: "Blue"
                      }
                  }
                  Item {
                      Rectangle {
                          width: 50
                          height: 50
                          color: "Red"
                      }
                  }
              }
          }
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post