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

StackView should clear focus when a new item is pushed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.11.0 Alpha
    • 5.6
    • Quick: Controls 2
    • None
    • f4700f0dd655ca5254ac67021ab9570c1b0cba7d

      In the following example, if you press tab and then space, a new item will be pushed onto the stack view, but you can continue pressing space to activate the button on page 1.

      import QtQuick 2.6
      import QtQuick.Window 2.2
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          width: 600
          height: 400
          visible: true
      
          Component {
              id: page1
      
              Column {
                  id: column
      
                  Label {
                      text: "Page 1"
                  }
      
                  Button {
                      text: "Go to page 2"
                      onClicked: column.StackView.view.push(page2)
                  }
              }
          }
      
          Component {
              id: page2
      
              Label {
                  text: "Page 2"
              }
          }
      
          StackView {
              anchors.fill: parent
              initialItem: page1
          }
      }
      

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

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes