Disable QDialogs default close button (upper left "cross button")?

Streight picture Streight · Apr 1, 2012 · Viewed 17.1k times · Source

Is it possible to disable/delete the QDialogs default close button at the upper left of the dialog?

Answer

user3912842 picture user3912842 · Aug 6, 2014

At least in (embedded) Linux, you can do this:

setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);

With that, I get a window which has the title but no buttons.