Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10749

New File > SwipeView code not implemented correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • None
    • None
    • All
    • 7f2b721db (qds/dev)
    • QDS Berlin - 2023 Week 39/40

    Description

      Looks like a copy and paste of StackedView with the qml type changed to SwipeView...  id even says stackLayout.
       

      import QtQuick 2.15
      import QtQuick.Layouts 1.15
      import QtQuick.Controls 2.15
      import DesignStudioTraining 1.0
      
      Item {
          width: Constants.width
          height: Constants.height
      
          SwipeView {
              id: stackLayout
              width: 100
              anchors.top: tabBar.bottom
              anchors.right: parent.right
              anchors.left: parent.left
              anchors.bottom: parent.bottom
              currentIndex: tabBar.currentIndex
      
              onCurrentIndexChanged: tabBar.currentIndex = stackLayout.currentIndex
      
              Item {
                  Label {
                      text: qsTr("Page 1")
                      anchors.centerIn: parent
                      font: Constants.largeFont
                  }
              }
      
              Item {
                  Label {
                      text: qsTr("Page 2")
                      anchors.centerIn: parent
                      font: Constants.largeFont
                  }
              }
              
              Item {
                  Label {
                      text: qsTr("Page 3")
                      anchors.centerIn: parent
                      font: Constants.largeFont
                  }
              }
          }
      
          TabBar {
              id: tabBar
              currentIndex: 0
              anchors.top: parent.top
              anchors.right: stackLayout.right
              anchors.left: stackLayout.left
              TabButton {
                  text: qsTr("Tab 1")
              }
              TabButton {
                  text: qsTr("Tab 2")
              }
              TabButton {
                  text: qsTr("Tab 3")
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thohartm Thomas Hartmann
            peter.rohles Peter Rohles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes