문제

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

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top