Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] Add an Item to QDockWidget title bar



  • Is it possible to add an Item (a QPushbutton or a custom QWidget) to QDockWidget?



  • Well, you have control over the title bar widget, so why not? You can access the title bar widget via QDockWidget::titleBarWidget().



  • Ohhh, It was that easy ? Thank you :)

    If I'm getting it correctly you meant I can specify a custom title bar using QDockWidget::setTitleBarWidget() method. That is all I wanted!


Log in to reply