[Interest] qml display question
Rutledge Shawn
Shawn.Rutledge at digia.com
Tue Jun 24 10:08:39 CEST 2014
>> Dear All
>> My display resolution is 800*480,
>
>> Sounds like you are on Android or on some sort of embedded system? So probably the reason is that you cannot have multiple windows: the whole application must be full-screen by design. Of course you can have a
>> red rectangle inside a black one if that's what you want.
>
> Yes, I am on the linux embedded system.
> I want to know where is the code to control the full screen. Is the code "glViewport(r.x(), deviceRect().bottom() - r.bottom(), r.width(), r.height());" in scene graph or other codes?
> I want to check the code to know the whole story about the qml display.
In QML you can create a Window { } (but only one instance per application on embedded Linux) as the top-level element instead of a Rectangle; it has a few more useful properties like visibility etc. (implemented in qquickwindow.cpp) And there is the Screen attached property (qquickscreen.cpp) which is a wrapper around QScreen (qscreen.cpp), exposing some selected properties. See the example in qtdeclarative/examples/quick/window for some ideas, but you can’t run the example directly because it tries to create multiple windows.
More information about the Interest
mailing list