Byngl
5th June 2007, 19:05
Qt 4.2.2, Windows XP (Home)
The following code produces a maximized window that can be moved by the user:
QMainWindow xyzzy;
xyzzy.setWindowFlags(xyzzy.windowFlags() & ~(Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint));
xyzzy.showMaximized();
If I remove the Qt::WindowMaximizeButtonHint from the above code, I get a maximized window that cannot be moved. I do not know the size of the desktop, nor if the task bar is displayed. I need the main window to take up all desktop space and not to be able to be moved around.
The following code produces a maximized window that can be moved by the user:
QMainWindow xyzzy;
xyzzy.setWindowFlags(xyzzy.windowFlags() & ~(Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint));
xyzzy.showMaximized();
If I remove the Qt::WindowMaximizeButtonHint from the above code, I get a maximized window that cannot be moved. I do not know the size of the desktop, nor if the task bar is displayed. I need the main window to take up all desktop space and not to be able to be moved around.