From kde-usability Sat Jan 29 19:30:55 2005 From: John Tapsell Date: Sat, 29 Jan 2005 19:30:55 +0000 To: kde-usability Subject: To all: How to connect tooltips to QStatusBar Message-Id: <200501291930.55212.john () geola ! co ! uk> X-MARC-Message: https://marc.info/?l=kde-usability&m=110702710612430 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