Results 1 to 10 of 10

Thread: Resize application for different resolutions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    39
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    13

    Default Re: Resize application for different resolutions

    Well, indeed i had several setMaximumWidth and setMinimumWidth for the widgets, i removed all of them and also reduced the font size ( i was using bold 10, changed it to normal 8), it helped a bit but it still have lot's of cutting at the bottom of the window. Maybe i'm indeed using too much widgets... Curious thing is that i'm almost cloning a similar program (don't know which language or program they used to make it), but in that program with the exactly same amount of widgets on screen (and same sizes), things work great between different resolutions. I'll now take a another look at all widgets to see how to sort this thing out

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Resize application for different resolutions

    Could you attach the UI file here? I'd like to take a look at it.

  3. #3
    Join Date
    Feb 2007
    Posts
    39
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    13

    Default Re: Resize application for different resolutions

    Actually i'm not using any UI file in my application, i've choosed not to use it (can the problem be here? )
    I'll take another look at this, and if i don't solve it today I'll try to clean the code and send
    the source code file to you. Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Resize application for different resolutions

    In that case attach the code you use to create the user interface.

  5. #5
    Join Date
    Feb 2007
    Posts
    39
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    13

    Default Re: Resize application for different resolutions

    Here's how i initialize my application

    Qt Code:
    1. Mainwindow = new QWidget;
    2. setCentralWidget( Mainwindow );
    3. Mainwindow->showMaximized();
    4.  
    5. Top_GroupBox = new QGroupBox( tr( "Group 1" ) );
    6. QGridLayout *MyLayout1 = new QGridLayout;
    7.  
    8. .......
    9. MyLayout1->addWidget( Label1, 1, 0, Qt::AlignRight );
    10. MyLayout1->addWidget( LineEdit1, 1, 1, Qt::AlignLeft );
    11. .......
    12. Top_GroupBox->setLayout( MyLayout1 );
    13.  
    14. // create 2 more Qgridlayouts here
    15. .....
    16. // add all 3 Qgridlayouts to the mainwindow
    17. .....
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Resize application for different resolutions

    It'd be nice if you also provided the contents of the layouts and the call to setLayout on Mainwindow.

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
  •  
Qt is a trademark of The Qt Company.