Results 1 to 3 of 3

Thread: Displaying Widgets on multiple, virtual displays (headless rpi)

  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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:

    Qt Code:
    1. QScreen* screen1 = app.screens().at(0);
    2. QScreen* screen2 = app.screens().at(1);
    To copy to clipboard, switch view to plain text mode 

    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?

  2. #2
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Displaying Widgets on multiple, virtual displays (headless rpi)

    Answering my own question--

    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:

    Qt Code:
    1. qDebug() << "Screen count = " << QGuiApplication::screens().count();
    To copy to clipboard, switch view to plain text mode 

    And got this

    Screen count = 1
    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?

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Displaying Widgets on multiple, virtual displays (headless rpi)

    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.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 2
    Last Post: 27th September 2015, 23:18
  2. Replies: 1
    Last Post: 7th September 2013, 02:13
  3. Replies: 1
    Last Post: 2nd October 2012, 02:38
  4. Multiple displays on X11
    By alisami in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2009, 18:25
  5. Displaying on multiple desktops?
    By nupul in forum Qt Programming
    Replies: 8
    Last Post: 6th May 2006, 19:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.