Full Featured VNC Client Widget for Qt

Posted on Posted in Qt Tutorials, Tutorials

In this post I am going to share a Qt widget that allows full control (view and control) of VNC servers over TCP/IP. Using it is as simple as dropping a QWidget on your user interface and then promoting it to QVNCClientWidget. I needed this recently but was not able to find a Qt widget or any other Qt/C++ code for that matter, that supports VNC Authentication and can be used in a  real cross-platform way. So I had to gather and write this widget piece by piece and make sure it build on all platforms supported by Qt.

Below is an example screenshot of my QVNCClientWidget running on a Windows host to control a Mac OS X that has a VNC Server setup and running in it.




Just make sure you provide the server’s IP address and password to the connectToVncServer function. Then call startFrameBufferUpdate function to start viewing and controlling the server.

vncView->connectToVncServer(“”, “MyPassword”);

Performance is not bad but it can be better if more compression supported protocols are developed into it.

Remember to call the following function when you need to disconnect from the server.


You can use the following Bitbucket repository the get the full source code to the widget and example project all in one place and ask your questions here if you had any.


2 thoughts on “Full Featured VNC Client Widget for Qt

  1. I try your program but face to somes issues.
    It is not possible to connect even if it is write connection successful !
    Check method connectToVncServer
    condition \x01 or \x02 are not available in my case small code tell me
    “Connection successful with security type \r\x85\x05\x81”

    please can you help ?

Leave a Reply

Your email address will not be published. Required fields are marked *