View Full Version : Remove close button on a Dialog in Linux
Krish_ng
18th July 2007, 11:54
I hav a application that makes use of a QDialog.Is there any way to remove close button on the Dialog.
Michiel
18th July 2007, 12:05
No. Unless you remove the whole titlebar with it.
A QWidget has a set of flags that handle this sort of thing: here (http://doc.trolltech.com/4.3/qt.html#WindowType-enum). There is no flag to remove the close button.
Edit: You could try turning off the Qt::WindowSystemMenuHint flag. But I'm not sure it would work.
Krish_ng
18th July 2007, 13:11
I tried using setWindowFlags. On Windows OS i am getting the Dialog with no close button.But the same code shows a close button on Dialog..Any idea
Michiel
18th July 2007, 13:55
Which flag did you use? I can't find any in the documentation.
Anyway, maybe you can only do it in Windows.
Why do you want to remove the close button anyway?
Krish_ng
20th July 2007, 06:59
I have an application that should work the same on Windows and Linux..In windows i had passed pWidget,Qt::WindowTitleHint as an arguements to the constructor of QDialog.It worked well on Windows but on Linux close button is visible...Any ideas
http://www.qtcentre.org/forum/f-qt-programming-2/t-qdialog-without-the-close-button-in-the-top-right-corner-7943.html#2
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.