Qt hide minimize, maximize and close buttons

ufukgun picture ufukgun · Jul 9, 2010 · Viewed 39.9k times · Source

Do you know how to hide minimize, maximize and close buttons of title bar in Qt. I especially need to hide it on QMainWindow.

Answer

Kamil Klimek picture Kamil Klimek · Jul 9, 2010

Set this window flags Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint

Note, that on some platforms it behaves in different way. For example on Mac OS X it Disables, (not hides) close/minimize/maximize buttons