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

Consider making ToolTip's timeout begin only when fully opened

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.1.0 RC
    • None
    • Quick: Controls 2
    • None
    • 0e516bc9638d7b5ade38d356a304473af6adbc48 (qt/qtquickcontrols2/dev)

    Description

      Quoting this comment:

      Another thing that I didn't know is that the timeout starts as soon as the popup is visible, not when it has been fully opened. That means that if you have an enter transition that is 1000 ms long, with a 500 ms timeout, the timeout will finish before the enter transition. A tooltip's timeout should be much longer than the enter transition, so it probably won't be an issue in practice, but I would have thought it would make more sense to start the timeout when "opened" becomes true.

      import QtQuick 2.15
      import QtQuick.Controls 2.15
      
      ApplicationWindow {
          width: 400
          height: 400
          visible: true
      
          Button {
              id: button
              text: "Button"
      
              ToolTip {
                  parent: button
                  visible: button.pressed
                  text: "Test"
                  timeout: 500
      
                  onOpened: print("opened")
                  onAboutToHide: print("aboutToHide")
                  onClosed: print("closed")
      
                  enter: Transition {
                      NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad; duration: 1000 }
                  }
              }
          }
      }
      

      Before starting work on this, we should probably check how widgets behaves in this regard.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-82257
          # Subject Branch Project Status CR V

          Activity

            People

              mitch_curtis Mitch Curtis
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes