hi,
i need to disable the window's maximize , minimize, close buttons in my app...
can any one, have any idea ?
any little help, could be appreciated.
@qtlinuxnewbie
hi,
i need to disable the window's maximize , minimize, close buttons in my app...
can any one, have any idea ?
any little help, could be appreciated.
@qtlinuxnewbie
see window flags, and widget attributes.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
i have already gone through the window flags but i dint get anything out of it..
Could u mention in specific,....
@qtlinuxnewbie
hi,
u can use
hope it helpsQt Code:
setWindowFlags(Qt::FramelessWindowHint);To copy to clipboard, switch view to plain text mode
Bala
@Bala
Thnk you for ur snippet
it worked well . and the buttons are not visible.
But the buttons should be visible in disable mode.
Is it possible ?
@qtlinuxnewbie
Qt Code:
if(pWindow->isEnabled()){ pWindow->setWindowFlags(Qt::FramelessWindowHint); }else { pWindow->setWindowFlags(Qt::Window); }To copy to clipboard, switch view to plain text mode
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
I don't think that you can achieve this by standard Qt's methods.
you can use such flags combination, but no minimize & maximize buttons will be not visible.
Qt::Window
| Qt::WindowTitleHint
| Qt::WindowSystemMenuHint
| Qt::CustomizeWindowHint
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
Try the following flag
Qt Code:
setWindowFlags(Qt::WindowTitleHint);To copy to clipboard, switch view to plain text mode
This show only the titlebar without min,max,close button
hope it helps
Bala
have u tried qtlinuxnewbie?
Bala
setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
@bala :this is what i have used:
@qtlinuxnewbie
Thnk u all .. my problem solved
@qtlinuxnewbie
Bookmarks