Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hide titlebar in a DockWidget #591

Open
dheerajshenoy opened this issue Feb 11, 2025 · 2 comments
Open

How to hide titlebar in a DockWidget #591

dheerajshenoy opened this issue Feb 11, 2025 · 2 comments
Assignees

Comments

@dheerajshenoy
Copy link

I want to hide the titlebar from a DockWidget. Also, another question regarding creating a custom titlebar for the DockWidget. I did find out about creating a custom ViewFactory and then overriding the createTitlebar() function but got confused. I basically want to add/remove buttons from the titlebar.

@iamsergio
Copy link
Contributor

Try the example:

./bin/qtwidgets_dockwidgets -t -z

See --help for more options

See ./bin/qtwidgets_dockwidgets -p for styling titlebar (you can even have a titlebar with 0px height), basically in createTitleBar() you return your own TitleBar subclass, and put inside whatever you like

@dheerajshenoy
Copy link
Author

Thank you for suggesting the examples. I have looked into these before. Unlike the ./bin/qtwidgets_dockwidgets -p program I want to style the right side part of the titlebar which contains the buttons for closing and docking. I want to add buttons of my own in this section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants