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. Don't understand how works width and height attributes of Window QML Type
Forum Updated to NodeBB v4.3 + New Features

Don't understand how works width and height attributes of Window QML Type

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 674 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.
  • D Offline
    D Offline
    Damalo_02
    wrote on last edited by Damalo_02
    #1

    Hello,
    I'm trying to use QML for graphic part of an Android app. I don't understand how works width and height attributes of Window QML Type.

    For example, if I set the width and height to 10, the whole screen of my phone appears in blue (the phone I am testing on has a screen size of 960 x 540. ), any idea why?

    0_1557222282616_92fa7610-39b1-4cd3-8c54-fe1352db90fd-image.png

    Thanks

    J.HilkJ 1 Reply Last reply
    0
    • D Damalo_02

      Hello,
      I'm trying to use QML for graphic part of an Android app. I don't understand how works width and height attributes of Window QML Type.

      For example, if I set the width and height to 10, the whole screen of my phone appears in blue (the phone I am testing on has a screen size of 960 x 540. ), any idea why?

      0_1557222282616_92fa7610-39b1-4cd3-8c54-fe1352db90fd-image.png

      Thanks

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Damalo_02 said in Don't understand how works width and height attributes of Window QML Type:

      any idea why?

      the top level item is stretched to fill the whole screen, at least on Android and iOS.

      Nothing you can do about it, its mandatory by the OS


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      4
      • D Offline
        D Offline
        Damalo_02
        wrote on last edited by
        #3

        Ok thanks a lot, that's what I wanted to know.

        So it means that width and height attributes are useless in top level item?

        J.HilkJ raven-worxR 2 Replies Last reply
        0
        • D Damalo_02

          Ok thanks a lot, that's what I wanted to know.

          So it means that width and height attributes are useless in top level item?

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Damalo_02
          Not necessarily useless but rather unnecessary.
          You should define it anyway, in case you end up compiling your project for desktop as well ;-)


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          3
          • D Damalo_02

            Ok thanks a lot, that's what I wanted to know.

            So it means that width and height attributes are useless in top level item?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @Damalo_02 said in Don't understand how works width and height attributes of Window QML Type:

            So it means that width and height attributes are useless in top level item?

            that depends on the underlying platform (as @J-Hilk pointed out)
            For example the same applies for EGLFS under Linux, but not for X11 under Linux.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Damalo_02
              wrote on last edited by
              #6

              Okay I see, thanks a lot for your answers :)

              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