PDA

View Full Version : Maximize button doesn't work



Morgan Cormier
23rd March 2011, 16:43
Hi,

I am doing an application that is made to run on both Linux and Windows.

I have a ui file with lots of widgets. In some of them I put a grid layout, even on the MainWindow so that the size of my widgets can increase or decrease as the user wants to increase or decrease the size of the Window. The size policy change with my widgets, it can be fixed, preferred or maximum.

My problem is that when I try on Ubuntu 10.10 everything work except that the maximize button doesn't work, I have to maximize the window manually, not very convenient. The window doesn't adjust to the size of the screen. Funny thing, it work fine on Windows (xp for sure). Also, when I remove the grid layout from my MainWindow, the maximize button is working.

Does someone know what I did wrong in my ui file? I can send it to you if necessary.

Thank you.

Zlatomir
23rd March 2011, 17:31
You can post the .ui file (or code) and we can test if it works, or tell you if we spot any layouts misuse in it.

Morgan Cormier
23rd March 2011, 17:55
Here is the link to my ui file, I couldn't attach it because it was too big!
removed URL

Please, tell me if you need something else.

Zlatomir
23rd March 2011, 18:41
I can't replicate your issue with maximize button, the maximize button works on my machine (Ubuntu 10.10 with Qt beta SDK - 4.7.2)

Morgan Cormier
23rd March 2011, 18:59
Thank you for your anwer,

If it doesn't come from the ui in itself, it doesn't come from my code since I still have this problem when I create a new project and use this ui.

It maybe come from the SDK since I use the 4.7.0 version or an installed/ not installed package on my Ubuntu 10.10.

I will try to use the 4.7.2 to see.

norobro
23rd March 2011, 19:17
FYI, the maximize button works fine here on Debian Sid with Qt 4.7.0 (64 bit) in KDE and Gnome.

It does spit out a warning- QGridLayout: Multi-cell fromRow greater than toRow

Morgan Cormier
24th March 2011, 20:33
I did a little more research and found out something interesting.

First, If I don't put the line
a.setStyle("gtk+");//a is a QApplication in my code, I don't have this problem.

Also, I tried to change the visual effect options on Gnome and found out that if I put normal or high visual effect(I was originally at none), the window is maximizing even with the gtk+ set style, but with the style I have another problem which is that when clicking on the window, the window itself resize and move.

Funny thing, with qt designer and the gtk+ style, with no visual effects the window doesn't offer the maximize button, with visual effects there is a maximize button and everything works fine.

Does someone know about this problem?