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

requestActivate() doesn't work onDoubleClick

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 5.12.1
    • 5.12.0
    • None
    • Windows 10 (64bit)
    • Windows
    • df27484fc0349bb060e023ac2dce246c1176d838

    Description

      In code below onDoubleClicked show window and make requestActivate for it. But window doesn't activate (rather it's activate and later lost activate). If make it only onClicked it work fine. This bug occur on Windows 10. Also I test it on mac and it work fine.

      =============================
      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.5

      Window {
      visible: true
      width: 640
      height: 480
      title: qsTr("Hello World")

      MouseArea {
      anchors.fill: parent
      onDoubleClicked:

      { testWindow.show() testWindow.requestActivate() }

      }

      Text

      { anchors.centerIn: parent text: "Double click me" }

      onActiveFocusItemChanged:

      { console.log("root Window:", activeFocusItem) }

      Window {
      id: testWindow
      width: 560
      height: 190

      onActiveFocusItemChanged:

      { console.log("testWindow:", activeFocusItem, contentItem) }

      TextEdit

      { width: 240 text: "<b>Hello</b> <i>World!</i>" font.family: "Helvetica" font.pointSize: 20 color: "blue" focus: true }

      }
      }

      Attachments

        Issue Links

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

          Activity

            People

              anrocha André De La Rocha (Inactive)
              kirilleremeev Kirill Eremeev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes