Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] How to prevent text from growing when user changes resolution when working with custom layouts
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to prevent text from growing when user changes resolution when working with custom layouts

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 915 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fs_tigre
    wrote on last edited by
    #1

    Hi,
    How can I prevent the text on buttons, labels etc. from scaling when the user changes its resolution in Windows 7 (small 100% -Medium 125% -Larger 150%)?

    What I would like to do is to fix the text so it doesn't change even if the user changes its resolution because I have noticed that if the resolution is changed the text grows and is not fully visible anymore.

    How do you usually design your applications so they look good on every possible resolution? I know this may be solved by applying a layout but I tried and I couldn't make it look the way I want to if I apply a layout.

    How do you usually deal with these issues when working with custom layouts?

    Thanks

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fs_tigre
      wrote on last edited by
      #2

      I found my own answar.

      Use StyleSheets and assign the font size, this will maintain the specified size regardless of what resolution\zoom the user is using.

      @// you can change multiple widgets with one line of code, by doing this...
      setStyleSheet("QPushButton, QLabel, QGroupBox {font-size:10px}");@

      Thanks

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved