QWidget, add TitleBar and custom button
Hello Guys, is possibile to customize a QWidget in order to add a Title bar and a custom button?
Thank you in advance
QDockWidget provides a nice framework for this. If you need extra functionality outside of what the QDockWidget default title bar offers, you can roll your own using setTitleBarWidget().
No idea what you want to achieve. All top-level widgets get a title bar automatically. What do you mean by a 'custom button', and where would you like to have it? In the title bar itself, or somewhere else?
I want to change icon e position of the "x" button. Is that possible?
No, there is no Qt API do that.
Having said that:
- You may be able to use platform depended API, or
- You could hide the default title bar, and implement your own