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. Scaling application (especially text) to screen size

Scaling application (especially text) to screen size

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 5.3k Views
  • 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.
  • M Offline
    M Offline
    maxmotor
    wrote on last edited by
    #1

    Hello Qt devs!

    My application consists of several screens, which are build using layoutmanagers (I think that's the name for it).
    This works as intended, but I need the text to scale as well. Is there some "easy" way to do this?

    Thank you for your time!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      First of all: we are talking about widgets here, right? Not about QML or anything like that?

      In the widget world, it is usually not not a good idea to start scaling text. The user has set his preferences for sizes of things like labels, and expects his applications to stick to that. There is no easy way to make the fonts scale dynamically either that I am aware of.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maxmotor
        wrote on last edited by
        #3

        It is widgets, yes.

        The application is intended to run on a tablet with a 5 or 7" screen. But I cannot predict whether a bigger screen will be used in the future or not. Running the application on a computer, the application is scaled to full screen. -And of course the text is rather small compared to the widget sizes.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Are you sure you want to use widget based UI on a tablet? It sounds like QML is more suited for that.

          The OS probably provides sane default sizes for fonts. You might want to stick to using those. Also, take note of the difference of physical screen size and resolutions. That the widgets become small compared to the text may be just fine: the user choose to invest in a a bigger screen, and thus might want to see more information in one go. Or, you make sure you tweak your UI so it actually shows more elements if the screen has enough real estate to make that work better. There is no one-size-fits-all answer to this one.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            maxmotor
            wrote on last edited by
            #5

            Um I must admit I haven't looked into QML. I only heard the name the other day for the first time. Qt is also quite new to me. I previously spent most my programming-time working with C#.
            I just finished my education back in January. About 12 weeks ago I got an internship in a company - they then hired me a couple of weeks ago when my internship ended. I guess what I'm trying to say is that I was told to make a Qt application for this. But maybe they haven't looked into QML either. Maybe I should give this information to my superior and hear what he has to say about this :)

            Thank you for your time Andre!

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              QML is Qt. You just use a different paradigm to create the UI, but the backend would work just like any other Qt application. QML is just more suited for the kinds of interaction that users expect on platforms like phones and tablets: touch-based, animated, etc.

              1 Reply Last reply
              0
              • P Offline
                P Offline
                ProfRivkin
                wrote on last edited by
                #7

                But QML has no ability to deal with the real-time, OpenCL/OpenCV, and GSL needs of real applications for machine automation, so its really not useful for much.

                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