1

By default, there are two small buttons on the QDockWidget toolbar: "detach" and "close".

How can I add a new button: "toggle fullscreen"?

ekhumoro
  • 115,249
  • 20
  • 229
  • 336
Bruno Gelb
  • 5,322
  • 8
  • 35
  • 50

1 Answers1

3

The QDockWidget.setTitleBarWidget function can be used to replace the existing titlebar (including buttons) with a custom widget of your own.

However, it's not possible to use QDockWidget.titleBarWidget get a reference to the default titlebar widget and add extra buttons to it.

ekhumoro
  • 115,249
  • 20
  • 229
  • 336