Displaying Widgets on multiple, virtual displays (headless rpi)
I have an application environment that has up to three, vnc servers running. It runs on a "headless" machine, i.e, there are no physical displays connected, only vnc connections.
Each Xtightvnc (or Xtigervnc) server provides access to an rpi's "desktop" on a different port. Vnc clients can connect to 5900, 5901, or 5902, depending on which desktop they want to view.
I'd like to update my Qt5 application so that some widgets are sent to the 5900 server, others to 5901, etc.
I've done some research to figure out how to pick which screen a widget targets, but those start with QApplication::screens and the desired screen selected using something like:
Code:
QScreen* screen1
= app.
screens().
at(0);
QScreen* screen2
= app.
screens().
at(1);
But, does QApplication know about virtual displays, i.e. a connected VNC server?
Is it possible for a single Qt application to show Widgets on different virtual display?
Re: Displaying Widgets on multiple, virtual displays (headless rpi)
Answering my own question--
Quote:
But, does QApplication know about virtual displays, i.e. a connected VNC server?
No
My Qt application is writing to an HDMI connected display. There is also a x11vnc server and a vnc client connected to 5900. I see an LXDE desktop and my Qt application widgets go there
I have a second (virtual Xtightvnc) server and connected with a client on port 5901. I see a second desktop on that client.
I added this code snippet to my Qt app:
Code:
qDebug() << "Screen count = " << QGuiApplication::screens().count();
And got this
Should I conclude from the lack of any reply that it is NOT possible to have a Qt app write widgets to desktops on different screens?
Re: Displaying Widgets on multiple, virtual displays (headless rpi)
Quote:
Should I conclude from the lack of any reply that it is NOT possible to have a Qt app write widgets to desktops on different screens?
I think you can conclude that no one who is active in following and posting in this forum has the same type of configuration and / or experience as yours, so no one can give you an answer. You might be better at getting an answer by asking in a forum that deals in embedded RPi systems or has more members active in embedded Qt development.