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. Responsive design for mobile app
QtWS25 Last Chance

Responsive design for mobile app

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 1.1k 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.
  • C Offline
    C Offline
    Clody21
    wrote on 27 Apr 2017, 09:40 last edited by
    #1

    Hello I would like to know how to set up a responsive layout on mobile devices (Android, Ios).
    I'm implementing a login page, so with a box that needs to be centered and with two input texts and one key, I can not figure out the size of the phone (portrait, landscape).
    Does anyone have an example, or can they indicate a technique?

    Thank you

    M 1 Reply Last reply 27 Apr 2017, 09:49
    0
    • C Clody21
      27 Apr 2017, 09:40

      Hello I would like to know how to set up a responsive layout on mobile devices (Android, Ios).
      I'm implementing a login page, so with a box that needs to be centered and with two input texts and one key, I can not figure out the size of the phone (portrait, landscape).
      Does anyone have an example, or can they indicate a technique?

      Thank you

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 27 Apr 2017, 09:49 last edited by
      #2

      @Clody21

      Hi
      Try
      QRect rect = qApp->primaryScreen()->geometry();

      and see what it reports ? ( to find size)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Clody21
        wrote on 27 Apr 2017, 10:18 last edited by Clody21
        #3

        I do not know where to place this code, i have imported QtWidget

        Thank you @mrjj

        M 1 Reply Last reply 27 Apr 2017, 10:30
        0
        • C Clody21
          27 Apr 2017, 10:18

          I do not know where to place this code, i have imported QtWidget

          Thank you @mrjj

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 27 Apr 2017, 10:30 last edited by
          #4

          @Clody21
          Im not sure i understand.
          Inside your mainwindow widget or any other place that gets run.

          " imported QtWidget"

          is this QML ?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GTDev
            wrote on 27 Apr 2017, 13:26 last edited by GTDev
            #5

            Hi,
            You might want to take a look at V-Play Engine for QML-based mobile apps and games. V-Play offers many components for creating cross-platform apps that automatically adapt their layout and UI to match the native iOS and Android user experience.

            V-Play comes with many open-source examples and project templates you can use as reference (there's also a template for a simple login-page). For an overview of the most important features, you can have a look at the Component Showcase demo:

            alt text

            To quickly learn the basic concepts you can have a look at some tutorials, for example Supporting Multiple Screens Sizes and Densities with V-Play Apps.

            Hope this helps!

            Best,
            Günther

            Senior Developer at Felgo - https://felgo.com/qt

            Develop mobile Apps for iOS & Android with Qt
            Felgo is an official Qt Technology Partner

            1 Reply Last reply
            2

            4/5

            27 Apr 2017, 10:30

            • Login

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