Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Is any dialog-zooming function exists?
QtWS25 Last Chance

Is any dialog-zooming function exists?

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 1.2k 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.
  • R Offline
    R Offline
    rom8726
    wrote on last edited by
    #1

    Hi! I want to run my app on Android devices with different screen resolutions, but if dialog's size is more than screen resolution, then dialog does not fit on the screen. And I want to know, is any way to zoom dialog for the screens with different resolutions exists (all controls must change its coordinates, sizes and font-sizes too)? May be, I need to set any flag for the dialog?

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

      Did you read the documentation on Qt's layout system?

      The font size does not automatically change, and it probably shouldn't. You cannot simply adapt to a smaller screen by making every thing on that screen smaller, especially not on a touch device. That results in unusable interfaces.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        s.frings74
        wrote on last edited by
        #3

        I could imagine such a feature. Every web browser can do that properly, so it should be technically possible.

        I also think that Qt is too much pixel-oriented. That was Ok in the past where all monitors and operating systems had only one fixed default dpi. But that has changed a lot and out CPU's (even on mobile devices) are powerful enough to scale images at runtime.

        I would like to enter sizes also in "em" like I can do with almost every element in HTML pages.

        A button with text adopts automatically to the size of the text. But a button with an Icon has a fixed size in pixels.

        Also, when I consequently use "em" everywhere, then I could modify the size of everything in one central point. Everything would depend on the font size of QApplication, when I modify this, then everything else would also change.

        I know that all Widgets can be created programmatically and also the sizes are changeable. But the GUI designer becomes almost useless if I do that.

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

          If you want that kind of stuff, use QML instead of QWidgets. It is much more flexible and aimed at scalable, animated, fluid interfaces.

          Note that you can set the font size using a stylesheet at application level, and use QApplication::setGlobalStrut to make items sort-of scale with that.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            s.frings74
            wrote on last edited by
            #5

            If you want that kind of stuff, use QML instead of QWidgets
            Yes, I should try that.
            For the moment I prefer Widgets, maybe because I started programming 25 years ago. My mind tells me that QML comes with an incredible overhead. I always think like have do the work of my computers processor myself :-)

            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