[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-usability
Subject: To all: How to connect tooltips to QStatusBar
From: John Tapsell <john () geola ! co ! uk>
Date: 2005-01-29 19:30:55
Message-ID: 200501291930.55212.john () geola ! co ! uk
[Download RAW message or body]
Hey all,
I spent the last few days trying to do this, including fix a bug in kdelibs,
so I thought I'd share my results. I have added comments for this to
kdelibs.
Menu items are KActions as you all know. KActions can have tooltips set:
(new KAction(.....))->setToolTip(i18n("hello"));
If you set tooltips for your actions, you can then get those tooltips to
show in the statusbar by doing like so, in your KMainWindow class.
actionCollection()->setHighlightingEnabled(true);
connect(actionCollection(), SIGNAL( actionStatusText( const QString & ) ),
statusBar(), SLOT( message( const QString & ) ) );
connect(actionCollection(), SIGNAL( clearStatusText() ),
statusBar(), SLOT( clear() ) );
JohnFlux
_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic