Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ApplicationWindow set the screen size ?

ApplicationWindow set the screen size ?

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 2.0k 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.
  • I Offline
    I Offline
    ixpervision
    wrote on last edited by
    #1

    I trying set the screen size using ApplicationWindow for learning events.When I was running on desktop work well.But when I was running on android ,I encountered trouble problem. When I kept the phone upright and start application, the form fits to screen well. than I tilt the phone and I was seing that the half of screen wrap white color . How can I overcome from this problem. I set the widht and height like that
    @ApplicationWindow{
    id:a
    width:Screen.width
    height:Screen.height
    color:"#eee8e8"}@

    1 Reply Last reply
    0
    • O Offline
      O Offline
      onek24
      wrote on last edited by
      #2

      I would go and say that your width and height are based on the screen and not on the holding position, that measnt on tilt your width is actually the real height. On fixing this problem you could go ahead and set:
      @a.width = Screen.height
      a.height = Screen.width@
      if the mobile device is hold crosswise.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ixpervision
        wrote on last edited by
        #3

        Thanks for answer. This recommend solved problem. If I want to set screen on start for not to change again so how can I lock sensors and set the screen one state ?

        1 Reply Last reply
        0
        • O Offline
          O Offline
          onek24
          wrote on last edited by
          #4

          Ugh, i never worket with sensors so i might not help out with that, sorry.

          1 Reply Last reply
          0
          • I Offline
            I Offline
            ixpervision
            wrote on last edited by
            #5

            ok. Thanks for attention

            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