[Qt-interest] Qt 4.6.1 - no tooltips in menu bar QAction

Stephen Collyer scollyer at netspinner.co.uk
Thu Apr 1 19:45:13 CEST 2010


On 1 April 2010 18:00, Constantin Makshin <cmakshin at gmail.com> wrote:

> 1) "Increase font size" is the action's text/title, not a tooltip;
>

The Qt docs say:
QAction::QAction ( const QIcon <qicon.html> & *icon*, const
QString<qstring.html>
 & *text*, QObject <qobject.html> * *parent* )

Constructs an action with an *icon* and some *text* and *parent*. If *parent
* is an action group the action will be automatically inserted into the
group.

The action uses a stripped version of *text* (e.g. "&Menu Option..." becomes
"Menu Option") as descriptive text for tool buttons. You can override this
by setting a specific description with setText <qaction.html#text-prop>().
The same text will be used for tooltips unless you specify a different text
using setToolTip <qaction.html#toolTip-prop>().

The final sentence seems to imply that this text is used as the tooltip. Is
this an error ?


> 2) menu items can't show tooltips.
>

Is this something that you've discovered through experience ?
I can't see anything in the Qt docs for QMenuBar or QToolTip that indicates
this.

-- 
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100401/8d0c60f5/attachment.html 


More information about the Qt-interest-old mailing list