Setting a tool tip on the title bar of a dock widget
-
If I use QDockWidget::setTitleBarWidget(QLabel*) I can set a tool tip on that label that says e.g.:
Double click here to dock/undock the image list
If OTOH I don't set a title bar widget, how do I set a tooltip that applies just to the title bar of the dock widget?
Thanks
David -
If I use QDockWidget::setTitleBarWidget(QLabel*) I can set a tool tip on that label that says e.g.:
Double click here to dock/undock the image list
If OTOH I don't set a title bar widget, how do I set a tooltip that applies just to the title bar of the dock widget?
Thanks
David@Perdrix said in Setting a tool tip on the title bar of a dock widget:
If OTOH I don't set a title bar widget, how do I set a tooltip that applies just to the title bar of the dock widget?
I fear you can not :(
void QDockWidget::setTitleBarWidget(QWidget *widget)
If a title bar widget is set, QDockWidget will not use native window decorations when it is floated.
(https://doc.qt.io/qt-6/qdockwidget.html#setTitleBarWidget)
Ergo, it will use the native OS title bar + decorations if no custom
QWidget
is used as one.
And I don't know of a way to set aQToolTip
to some native OS controls.
For Windows it could be possible by using WinAPI
And you need different code for Linux/Mac thenMaybe helpful?!