ApplicationWindow set the screen size ?



  • 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"}@



  • 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.



  • 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 ?



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



  • ok. Thanks for attention


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.