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

ToolTips are not easy to use

    XMLWordPrintable

Details

    Description

      When creating a desktop application with Qt Quick, it is very difficult to use the ToolTip control to cover both the mouse and touch based controls scenarios.  So say you have a tool bar that has many buttons that are just icons.  Normally in a desktop application the expected behavior is that if you hover over a control, after some small amount of time you should get a tool tip.  If you are using touch controls, you need to push and hold.  This is explained in the ToolTip's docs, but not how you can do both.  And regardless of if I did manage to write the code that would support both, or just use one of the two, now for every control I need to paste that code in.  I think that this should be baked in the the styling behavior of each control instead.  So I should only have to set the text of the ToolTip attached property and the default behavior should be (based on platform/style) hover and onPush (via touch).

      ToolTip.text: qsTr("My Tools Tip") 

      The current behavior assumes you're going to do something custom and special every time instead of having sensible defaults.

      ToolTips are an essential part of making complex desktop applications and it should be expected that every control that can receive user interaction will need to have a tool tip, so we shouldn't make the user use more than one line of code for each (or that we should expect them to subclass each Control component to wrap what should be expected behavior).

      Tooltips are much more sensible in QWidget based applications, and we should strive to be more that that.

      Attachments

        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
            janichol Andy Nichols
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes