C

Qt VNC Server - Remote Desktop Example

Demonstrates how to make a remote desktop using Qt VNC Server and Qt Wayland Compositor.

Remote Desktop demonstrates the use of the Qt VNC Server module and the Qt Wayland Compositor module to make a Wayland compositor with remote desktop capabilities.

The example follows the same setup as in the Minimal QML example from Qt Wayland Compositor.

The main modification is that the Remote Desktop example wraps the top level item of the WaylandOutput inside a VncItem:

VncItem {
    id: vncItem
    anchors.fill: parent

This will automatically create a server which shares the whole desktop on the default port of 5900.

When any remote user connects, this is indicated by the presence of a red circle in the top-left corner of the desktop, as shown in the screenshot. This is a simple Rectangle item which has its visibility bound to the connectionActive property of the VncItem:

Rectangle {
    id: connectedIndicator
    visible: vncItem.connectionActive
    x: 10
    y: 10
    width: 30
    height: 30
    radius: 15
    color: "red"
}

Files:

Available under certain Qt licenses.
Find out more.