I hav a application that makes use of a QDialog.Is there any way to remove close button on the Dialog.
I hav a application that makes use of a QDialog.Is there any way to remove close button on the Dialog.
No. Unless you remove the whole titlebar with it.
A QWidget has a set of flags that handle this sort of thing: here. 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.
"The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry
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
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?
"The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry
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
J-P Nurmi
Bookmarks