PDA

View Full Version : close button disabling



omprakash
18th May 2008, 17:35
dear friends
i am working on Qt3.3.
I want to disable the close button as well as minimize button in my main window.
what is the code i shud write??

aamer4yu
19th May 2008, 05:31
Does setWindowFlags(Qt::WindowTitleHint) work for you ??

omprakash
19th May 2008, 10:31
Dear friend,
i am using Qt3.3
SO i dont thick the above function exists.
The above piece code worked fine for my Qt4.3. application. But

I need a function that exists in Qt3.3

ok bye

jpn
20th May 2008, 09:45
Qt doesn't provide a way to disable (ie. gray out) the close button. See this thread for a Windows specific solution: http://www.qtcentre.org/forum/f-qt-programming-2/t-disable-close-button-x-of-a-qdialog-9348.html. It's for Qt 4 but the same approach should with Qt 3 as well (QWidget::winId() is available in Qt 3 too).