Results 1 to 2 of 2

Thread: resize main window and widgets inside it on screen/monitor size change

  1. #1
    Join Date
    Jan 2013
    Posts
    25
    Thanks
    2
    Platforms
    Windows

    Default resize main window and widgets inside it on screen/monitor size change

    My MainWindows is subclassing QMainWindow.
    I have multiple monitors. My mainwindow and widgets inside the main loose their aspect ratio after moving from one screen to other.

    How can I resize my main window according to new screen size while maintaining the aspect ratio?

    I tried following this, it didn't help in my case.

    Thanks in advance.

    Regards,

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

    Default Re: resize main window and widgets inside it on screen/monitor size change

    Quote Originally Posted by tesmai4 View Post
    How can I resize my main window according to new screen size while maintaining the aspect ratio?
    Reimplement the resize event or use width-for-height functionality.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    tesmai4 (6th September 2013)

Similar Threads

  1. How to center main window on screen?
    By LarryP in forum Qt Programming
    Replies: 5
    Last Post: 24th July 2020, 21:29
  2. main window gets wider than screen size
    By shanchathuranga in forum Qt Programming
    Replies: 1
    Last Post: 16th March 2012, 15:45
  3. Resize of main window without setFixedSize
    By ElyBeta in forum Qt Programming
    Replies: 2
    Last Post: 15th July 2010, 16:09
  4. main window resize question
    By schnitzel in forum Qt Programming
    Replies: 12
    Last Post: 29th May 2010, 10:31
  5. Replies: 11
    Last Post: 11th August 2008, 10:14

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.