How to Launch QQuickWindow at the top of all screens.
here we are working on infotainment, where we have Projection Screen for iPhone and Android, to work on this I need to send some touch events. so I want to load one transparent QML page on the top of the Projection Screen, but every time its loading at the bottom of the screen, please let me know if there is any solution.
Hi @Krish, AFAIK android OS doesnot have the traditional windowing system so I doubt that having multiple windows will work on it. On systems where it is supported setting
Qt::WindowStaysOnTopHintflag should work.
Sorry no idea about
Hi @p3c0, Thanks for the replay. I'm very new to QT n QML, as per my understanding you asking me to try with this Qt::WindowStaysOnTopHint?
I'm using QQuickView *view; and loading the QML with
view.showfullscreen(); and closing the QML with
but still page loads at the bottom of the projection screen, but I need it at the top of the sacreen.
please let me know if there is any fucntion in QQuickView related to this topic.
Thanks in advance.
@Krish How many windows are there in your application ?
@p3c0 There are two QML windows, where I can place a black window at background of the projection screen and one transparent window which I need to place at foreground of the Projection Screen, which I can send touch events to Middle Ware.
but both QML pages are focus at the background only.
@Krish As I said earlier multiple windows is not supported on android. Can't you have one root window using
QQuickViewand call different QML's inside the main QML ?
@p3c0 Thanks for your kind reply. Yes, I'm doing the same, calling one QML page inside main.qml and using QQuickView invoking main.qml, and I tried with only one window (only main.qml) which focusing at below the Projection Screen.
@Krish Then try setting
zvalue higher for the component which you want on top of the others.
@p3c0 Yes we are following Z order, from the MW Team we are getting the Android screen they are using Screen Manager(OPEN GL), to pop up at the HMI side. once I got the screen I need to place the Transparent QML on the Top of the android screen, and I'm wondering, the Focus is on the QML Page which is background, its not on the Android Screen, I can send Touch Events and Some Button Events also through QML page, but if have to show any pop up QML's on the top of the android screen its going on the background, not on the foreground, there I'm facing an issue.
Sorry for the late reply.
Thanks in advance.
@Krish What do you mean by android screen ?
@p3c0 We are Projecting the Android screen on our infotainment, which can operate Phone screen on Car's Infotainment. I mean the Android screen is the screen which is projecting on the infotainment.