Hi,

I have a problem with resizing QMainWindow. When I maximise or minimise the window, it sometimes happens that a part of the window falls outside the screen. In most cases, it happens when running the application on a laptop with a non-standard size screen. For example, when I maximise the screen using the maximise button and then minimise it, part of the window is not shown. For convenience I created a small demo application for this problem. This is the code:

QApplication a(argc,argv);
QMainWindow mwindow;
QSize size(3000,4000);
mwindow.setMaximumSize(size);
mwindow.show();
return a.exec();

I know the size I set is rediculously large, but It is just an example, it also happens with other values. As I don't know beforehand on which size of screen the program will run, I cannot hardcode the values. Can I load the maximumsize on startup based on the size of the screen? Any other suggestions?

Thanx!

ps: I use QT3 on Linux, but when I try it on windows, it also has the same problem.