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. Resolution-independence
Forum Updated to NodeBB v4.3 + New Features

Resolution-independence

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.9k 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.
  • J Offline
    J Offline
    jza1
    wrote on last edited by
    #1

    Hey guys,

    I was thinking about what steps should I take to make my application compatible with different font sizes and other UI properties the user has defined in OS system settings.

    In Qt Creator, I tossed a couple of labels on a form and when I went to KDE Appearance setup to crank the general font size up, the text couldn't fit in the labels any more. Right now I'm on Windows, but I expect it's the same thing there.

    Should I write some code or is there some other logic available to take care of this? Many Qt apps seem to get this right somehow.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      Did you use layouts in your test form or did you just drop labels on the form?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jza1
        wrote on last edited by
        #3

        I just dropped them like that. But indeed it seems layouts might be exactly what I'm looking for, thanks!

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bibek
          wrote on last edited by
          #4

          First of all, you need to use anchors, as in case of Symbian and meego , maemo mobile apps.
          Then try setting the font sizes and other margins, etc by platformStyle properties...
          Try avoiding hard coding the values as much as possible.

          Try declaring heights and widths as fractions of screen size, etc, etc

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bibek
            wrote on last edited by
            #5

            Also try using layouts as suggested, but inside the layout properties, remember to use my tips :)

            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