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

QML Tooltip visibility is set to false but should not

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.6.2, 6.7.0 FF
    • 5.12.3
    • Quick: Controls 2
    • None
    • macOS, Windows
    • c16dc16ca (dev), e0b54d876 (6.6)

    Description

      There are two Bugs:

      1. If I create a Tooltip that is visible in the main Window I get the error "<Unknown File>:1:30: QML ToolTip: cannot find any window to open popup in."
      2. If a Tooltip A is visible and the visibility of ToolTip B is set to false, ToolTip A is also invisible (if you hover the first Tooltip disappear)

       

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQml 2.12
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          Page{
              anchors.fill: parent
              ToolTip.visible: true // does not work, getting error : <Unknown File>:1:30: QML ToolTip: cannot find any window to open popup in.
              ToolTip.text: "Show something"
              Component.onCompleted: ToolTip.visible = true // workaround for line 13
              ToolTip.onVisibleChanged: {
                  console.log("Global Tooltip is",ToolTip.visible)
              }
      
              Rectangle{
                  anchors.fill: parent
                  anchors.margins: 200
                  color: "red"
                  MouseArea{
                      anchors.fill: parent
                      hoverEnabled: true
                      ToolTip.visible: containsMouse && false // is never visible, but when you hovering, the other Tooltip hides
                      ToolTip.text: "You are hovering"
                  }
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              autoantwort autoantwort
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes