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

requestActivate() doesn't work onDoubleClick

XMLWordPrintable

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

      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 }

      }
      }

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes