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.


Leave a Reply

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