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

StackView should clear focus when a new item is pushed

    XMLWordPrintable

Details

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

    Description

      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
          }
      }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes