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

requestActivate() doesn't work onDoubleClick

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Duplicate
    • Affects Version/s: 5.12.0
    • Fix Version/s: 5.12.1
    • Labels:
      None
    • Environment:
      Windows 10 (64bit)
    • Platform/s:
      Windows
    • Commits:
      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

              Assignee:
              anrocha André De La Rocha
              Reporter:
              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