Qt VNC Server - Remote Desktop Example

6.12.0 ('dev' branch)
  • Qt 6.12
  • Qt VNC Server
  • Qt VNC Server - Remote Desktop Example
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 serverState property of the VncItem:

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

Files:

  • remotedesktop/CMakeLists.txt
  • remotedesktop/main.cpp
  • remotedesktop/main.qml
  • remotedesktop/remotedesktop.pro
  • remotedesktop/remotedesktop.qrc

Available under certain Qt licenses.Find out more.

Contact Us
  • Qt Group
    • Our Story
    • Brand
    • News
    • Careers
    • Investors
    • Qt Products
    • Quality Assurance Products
  • Licensing
    • License Agreement
    • Open Source
    • Plans and pricing
    • Download
    • FAQ
  • Learn Qt
    • For Learners
    • For Students and Teachers
    • Qt Documentation
    • Qt Forum
  • Support & Services
    • Professional Services
    • Customer Success
    • Support Services
    • Partners
    • Qt World
  • © 2026 The Qt Company
  • Feedback

Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.

Từ khóa » Vnc 0