How to create a button on the title bar using Qtcreator?
-
wrote on 20 Jun 2022, 09:37 last edited by
I want to create a button named as "Log Out" in the title bar in the rightmost corner of the application.
-
I want to create a button named as "Log Out" in the title bar in the rightmost corner of the application.
@himanshu-chauhan I don't think you can do that with Qt, unless you implement your own title bar (title bar is handled by the OS window manager, not Qt).
Also, this would be unusual: why do you want to put a button in the title bar? -
wrote on 20 Jun 2022, 09:48 last edited by
Ok thanks.
If I ever had multiple users than I can just make use of that logout button. -
Ok thanks.
If I ever had multiple users than I can just make use of that logout button.@himanshu-chauhan Yes, but this button does not have to be in the title bar :-)
There are applications putting UI controls into title bar (like Firefox), but most don't do this.
You would either have to use native APIs or implement the title bar by yourself.
1/4