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. layout problems
Qt 6.11 is out! See what's new in the release blog

layout problems

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 2 Posters 1.3k Views 2 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.
  • canellasC Offline
    canellasC Offline
    canellas
    wrote on last edited by canellas
    #1

    Hi,

    I developed an app for Android (and iOS), where there is a login screen. This screen has an image on top, a smaller image below it, and two text boxes, for email and password, and a button for the user to send them.

    As you can (I hope) visualize, nothing too complicated.

    The thing is: I can not get the layout to be the same when I run on my notebook (for testing), on Android and iOS. At first I could not avoid that the images were displayed out of proportion. So, I wrote code to calculate theirs sizes, and I managed that they were displayed with the right proportion. But the two text boxes, along with the button become too narrow.

    I tried to use the layout and spacers components, but I failed badly.

    Does anyone have an example of a similar layout?

    Thanks!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show yours ? That might help finding what's going wrong.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • canellasC Offline
        canellasC Offline
        canellas
        wrote on last edited by
        #3

        Yes!

        Here it is:

        0_1502054832889_Screenshot_20170806-182530.png

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you also show what you get on your development machine ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • canellasC Offline
            canellasC Offline
            canellas
            wrote on last edited by
            #5

            No problem:
            0_1502057270398_Captura de tela de 2017-08-06 19-06-32.png

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Widgets + style sheet ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • canellasC Offline
                canellasC Offline
                canellas
                wrote on last edited by
                #7

                Thanks for your time.

                I made it work correcting the layout, styles and because I found out the scaledContents property.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Great !

                  Thanks for your feedback :)

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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