[Interest] How to set tooltip for close button in title bar?
mansy_blue at yahoo.com
Tue Jun 11 04:38:31 CEST 2013
I need to set my own tooltip to the close button of the title bar in my application, in a QMdiSubWindow or QMainWindow classes, and also in a QDockWidget. But there are are difficulties.
I have investigated in this regard, the result is:
* To set tooltip for close button of a dock widget
in title bar, there are two method:
· The first one is set tooltip in style sheet via
its assigned object name by QDockWidgetPrivate class :
“qt_dockwidget_closebutton”. This method affects in all dock widgets throughout
· As the second method, we can create a title bar
widget for this purpose and set it to dock widget. By this method, I don't know if it is needed to handle all title bar functionalities.
* To set tooltip for close button of trace file,
we should have inherited class from QMdiSubWindow class together plus its own
private class in order to follow the Qt approach. For this purpose, it is
needed to apply some changes in QMdiSubWindow. For more details, a new constructor should be added included the address of the private class, it will be used only for derived classes in order to access to the private class of the base class.To do this, QMdiSubWindowPrivate class has not been exportedin order to inherit.
set tooltip for application, I couldn’t find any solution.
I really appreciate if you guide me to find a suitable solution to solve the matter in this context.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest