Results 1 to 3 of 3

Thread: Qt5 Window Widget Application controls multiple screen resolutions

  1. #1
    Join Date
    Jul 2019
    Posts
    1
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question Qt5 Window Widget Application controls multiple screen resolutions

    Hello community !!!

    I am very new to Qt5, just 3 days programming with it, but i have been programming for many years. The thing is that i have a question related to form controls, i have a monitor with a resolution of 1920 x 1080 if i develop the form controls and layout here, when i deploy the application in lower or bigger screens how the controls adapt? Just curious, because it will be my first application in Qt5. Thank you in advance !!

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt5 Window Widget Application controls multiple screen resolutions

    Properly layouted widget applications are dynamically resizeable.
    I.e. unless you specifically prohibit it, a use can resize the window from as small as its inherent minimum size to as wide or height as they want to.

    Qt can also deal with different DPI.

    Cheers,
    _

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

    bgining2this (23rd July 2019)

  4. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt5 Window Widget Application controls multiple screen resolutions

    One gotcha that I have found is in handling OS-based font scaling (e.g. Windows display setting to change the default font scale to something other than 100%). If you design a form and restrict the maximum size of certain child widgets so they look "attractive", then font scaling can result in unintended clipping when the UI is shown on a different display. If you don't set a maximum size, then Qt will expand the widgets to fit their contents (usually), but the downside is that sometimes the widgets can be too wide.

    Layouts will stretch their contents to fill the available space, subject to app and default constraints, and sometimes the width is just too much to make an attractive form (list or combo boxes far too wide for their contents, for example). You can control this somewhat using layout spacer items (stretch), but it is often a compromise.

    So it is good to test your UI under various display conditions.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. The following user says thank you to d_stranz for this useful post:

    bgining2this (23rd July 2019)

Similar Threads

  1. Full Screen window with separate window widget on top
    By Linwood in forum Qt Programming
    Replies: 3
    Last Post: 15th January 2017, 11:39
  2. using one signal to update multiple multiple controls
    By henryjoye in forum Qt Programming
    Replies: 7
    Last Post: 13th December 2011, 15:19
  3. Replies: 1
    Last Post: 7th October 2011, 22:26
  4. Replies: 9
    Last Post: 25th January 2008, 18:43
  5. Dialog sizes and different screen resolutions.
    By hvengel in forum Qt Tools
    Replies: 3
    Last Post: 2nd April 2006, 11:05

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.