How to disable 3 controls on the main application
Hello Everyone..
I have question here? I want to disable controll
s like mimimize, maximize and exit buttons on the title bar of the application and i could remove atleat 2 of them correctly. but finding difficulty further. Is there any way to do this and my title bar should look with only caption on it. Any help? Thanks in advance!!
Re: How to disable 3 controls on the main application
I dont know how this works..
but it works...
Code:
window.setWindowTitle("Hello abc");
window.show();
By the way what workaround you tried ? I would like to know
Re: How to disable 3 controls on the main application
Hi...
I tried on QWidget by setting the fixed size for the widget something like this..
Code:
w.setFixedSize(int x, int y)
This is will diable the maximize contoll on the application...
In the same way i want then not be visible on the title bar
Re: How to disable 3 controls on the main application
Which Qt version are you using?
Re: How to disable 3 controls on the main application
Using Qt 3.3.3 version on X11
Re: How to disable 3 controls on the main application
by the way,
isnt QMainWindow window(0,Qt::WindowTitleHint); working for you ?
Re: How to disable 3 controls on the main application
Your option code is not working with Qt 4. I want this to done on Qt 3 and now i am checking in both version of Qt.
Re: How to disable 3 controls on the main application
I dont know abt Qt 3,
I am using Qt 4.2
But I am just setting the windows flags of the QMainWindow constructor.
I see the Qt 3 version has const char* as second parameter.
Quote:
Q3MainWindow::Q3MainWindow ( QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = Qt::WType_TopLevel )
Just set the Qt::WindowTitleHint parameter for Qt::WindowsFlags
Re: How to disable 3 controls on the main application
You can use a QtoolBar instead of a widget. The QToolBar inherits QDockWindow... There you can provide a close button if you want......
Hope this helps
Re: How to disable 3 controls on the main application
Try passing Qt::WStyle_Customize|Qt::WStyle_Title. I doubt you'll be able to get rid of the close button this way, but you might try.