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. Selective UI based on device
Qt 6.11 is out! See what's new in the release blog

Selective UI based on device

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

    Hi,

    I need to develop qt application for various models of devices, they differ mainly in screen size, resolution and color depth and layout (landscape/portrait) only.

    I need to have my application to adapt the UI according to device capabilities, I can create different ui files for each models and keep the backend same.

    My Question, is how can I make my application load ui, provided I can get the device model no: on runtime.

    Thanks in advance.

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      are you also looking at QML to be used as the UI for your device(s)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sebanrajan
        wrote on last edited by
        #3

        I am using qt-4.5.3 and Qt designer for developing the UI.

        1 Reply Last reply
        0
        • ? This user is from outside of this forum
          ? This user is from outside of this forum
          Guest
          wrote on last edited by
          #4

          QML is then ruled out.
          Looks like you are trying to bundle all the different UIs into your application and at runtime you want to use the correct one. But won't you be bloating your installable needlessly?

          Maybe you can seek to have a single UI that smartly arranges the components based on the orientation, by using correct layouts. The app could be opened in fullscreen mode.

          you can look at QSystemDisplayInfo to get color depth and other details of the device

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Fuzzbender
            wrote on last edited by
            #5

            You might want to look at http://doc.qt.nokia.com/latest/designer-using-a-ui-file.html#run-time-form-processing for selecting the .ui file runtime.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sebanrajan
              wrote on last edited by
              #6

              Yes, the installable will be huge, but the trick here is that,the front end is developed by 3rd party who knows little programming, so we advice them to use designer to create the layouts as they wish for each model.

              Else we need to take their UI files and arrange the widget programatically, which cause double effort.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Andreas
                wrote on last edited by
                #7

                The class "QUiLoader ":http://doc.qt.nokia.com//4.7/quiloader.html might be what you are lokking for.

                --
                Andreas

                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