Solved Don't understand how works width and height attributes of Window QML Type
-
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?
Thanks
-
@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
-
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?
-
@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 ;-) -
@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. -
Okay I see, thanks a lot for your answers :)