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

Resizing SwipeView should not animate content item positioning

    XMLWordPrintable

Details

    • macOS

    Description

      Please try to horizontally resize the MainWindow of the following example.

      When the second item is the SwipeView's currentItem then horizontally resizing the window (and the SwipeView) does not look very nice.

      While this is probably not an issue with mobile it limits the usefulness on the desktop where window resizing is still somewhat popular

      import QtQuick 2.12
      import QtQuick.Controls 2.5
      
      ApplicationWindow {
        visible: true
        width: 640
        height: 480
        title: qsTr("Tabs")
      
        Component.onCompleted: tabBar.currentIndex = 1
      
        SwipeView {
          id: swipeView
          anchors.fill: parent
          currentIndex: tabBar.currentIndex
      
          Rectangle {
            color: "yellow"
          }
      
          Rectangle {
            color: "blue"
          }
        }
      
        footer: TabBar {
          id: tabBar
          currentIndex: swipeView.currentIndex
      
          TabButton {
            text: qsTr("Page 1")
          }
          TabButton {
            text: qsTr("Page 2")
          }
        }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            njeisecke Nils Jeisecke
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes