PDA

View Full Version : Why will my QMainWindow not minimize properly?



ZB
18th September 2006, 19:38
I am creating a QMainWindow with no parameters and setting an interface up inside it with the code built by the uic-tool. The window and interface work as they should except one thing - clicking the minimize button will not minimize it properly but just resize it to a small portion of the title bar and positioning it in the lower left of my desktop. This is a standard main window built in the Designer and has had no parameters except its title changed.

How do I resolve this? I am using the pre-built Qt 4.1.4 Open Source package under Windows XP SP2.

naresh
20th September 2006, 16:04
Are you sure that you've created QMainWindow object? Check in Object Inspector if it's class name is QMainWindow and not QDialog (and propably it is QDialog).

ZB
20th September 2006, 18:38
Thanks, I was able to correct it. I did have a QMainWindow and when I rewrote my code I saw that my interface class also inherited QMainWindow, which caused the problem. Probably a common beginner mistake when building your first Qt code from examples in the documents.