Results 1 to 7 of 7

Thread: Maximize button doesn't work

  1. #1
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Maximize button doesn't work

    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.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Maximize button doesn't work

    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.

  3. #3
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Maximize button doesn't work

    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.
    Attached Files Attached Files
    Last edited by wysota; 23rd March 2011 at 19:07. Reason: Ever heard of file compressors?

  4. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Maximize button doesn't work

    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)

  5. #5
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Maximize button doesn't work

    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.

  6. #6
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Maximize button doesn't work

    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

  7. #7
    Join Date
    Mar 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: GTK style and Gnome visual effects problem

    I did a little more research and found out something interesting.

    First, If I don't put the line
    Qt Code:
    1. a.setStyle("gtk+");//a is a QApplication
    To copy to clipboard, switch view to plain text mode 
    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?

Similar Threads

  1. how to disable the maximize button?
    By zabeehkhan in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2010, 07:26
  2. setchecked( true) of the radio button doesn't work
    By richardander in forum Qt Programming
    Replies: 9
    Last Post: 28th January 2009, 17:54
  3. why doesn't the button work?
    By mattia in forum Newbie
    Replies: 18
    Last Post: 5th November 2007, 12:14
  4. Replies: 2
    Last Post: 1st August 2006, 10:23
  5. custom maximize button---
    By Naveen in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 13:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.