PDA

View Full Version : QDockWidget::setTitleBarWidget(), is hiding close and float button on the title bar.



suneel1310
20th January 2014, 08:44
I have a QDockWidget, and I have added a QWidget which houses a QProgressBar, as a title bar widget of the dockwidget.
But when I do this, I am not able to see the default close and float buttons on the titlebar of the dockwidget.

Any help will be appreciated :)

skebanga
27th October 2015, 18:32
I realise this was asked ages ago, but in case anyone else is looking for an answer to this.

This is expected behaviour.

From the documentation (http://doc.qt.io/qt-4.8/qdockwidget.html#setTitleBarWidget)

If a title bar widget is set, QDockWidget will not use native window decorations when it is floated.