Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51669

QQC2: SwipeView is not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.1
    • 5.6.0 RC
    • Quick: Controls 2
    • None
    • a055629f43cf8589ff6d69e46b2610429aaa4167

    Description

      The last page appears over the first page:

      import QtQuick 2.6
      import QtQuick.Layouts 1.0
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          header: PageIndicator {
              id: pi
              interactive: true
              count: views.count
              currentIndex: views.currentIndex
          }
      
          SwipeView {
              id: views
              anchors.fill: parent
              currentIndex: pi.currentIndex
              TextArea {
                  id: vertextShader
                  placeholderText: qsTr("Text Area 1")
              }
      
              TextArea {
                  id: fragmentShader
                  placeholderText: qsTr("Text Area 2")
              }
              Item {
      
              }
              Flickable {
                  clip: true
                  contentHeight: content.height
                  contentWidth: content.width
                  Grid {
                      id: content
                      columns: 8
                      Repeater {
                          model:  80
                          delegate: Button {
                              height: width
                              text: "GL_TEXTURE" + modelData
                              background: Image {
                                  id: image
                              }
                          }
                      }
                  }
              }
          }
      }
      

      Test case 2

      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          header: PageIndicator {
              id: pi
              interactive: true
              count: views.count
              currentIndex: views.currentIndex
          }
      
          SwipeView {
              id: views
              anchors.fill: parent
              currentIndex: pi.currentIndex
              Column {
                  anchors.horizontalCenter: parent.horizontalCenter
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      horizontalAlignment: Text.AlignHCenter
                      text: qsTr("Test 1")
                  }
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      style: Text.Normal
                      textFormat: Text.RichText
                      text: qsTr("<p>
                              bla bla bla page 1 </p>")
                      onLinkActivated: Qt.openUrlExternally(link);
                  }
              }
              Column {
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      horizontalAlignment: Text.AlignHCenter
                      text: qsTr("Test 2")
                  }
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      style: Text.Normal
                      textFormat: Text.RichText
                      text: qsTr("<p>
                              bla bla bla page 2 </p>")
                      onLinkActivated: Qt.openUrlExternally(link);
                  }
              }
              Column {
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      horizontalAlignment: Text.AlignHCenter
                      text: qsTr("Test 3")
                  }
                  Label {
                      anchors.horizontalCenter: parent.horizontalCenter
                      style: Text.Normal
                      textFormat: Text.RichText
                      text: qsTr("<p>
                              bla bla bla page 3 </p>")
                      onLinkActivated: Qt.openUrlExternally(link);
                  }
              }
          }
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-51669
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              taipan BogDan Vatra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: