Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qtcreator in docker container through vnc



  • Hello everybody and thank you in advance for your attention.

    I'm a beginner with Qt and I'm trying to make an app making use of it to run inside a Ubuntu 20.04 docker image through a VNC connection. In order to be sure that everything on Qt side works as expected, I'm trying to run inside the container the qtcreator executable. With the default platform everything seems to be fine. However, when I specify "-platform vnc" option, even if I can connect using a VNC client (TurboVNC), my mouse and keyboard don't work.

    The docker image is nvidia/cuda:11.3.0-devel-ubuntu20.04 and I've installed qtcreator with apt-get (you can find the corresponding image in my dockerhub repo:
    christopherbignamini/cuda:11.3.0-devel-ubuntu20.04_Qt).

    I'm running on a Mac and the docker execution command I'm using is:

    docker run -ti --rm --privileged -p 5900:5900 christopherbignamini/cuda:11.3.0-devel-ubuntu20.04_Qt bash

    The output of the qtreator command with vnc is:

    qtcreator -platform vnc

    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    This plugin does not support createPlatformOpenGLContext!
    This plugin does not support createPlatformOpenGLContext!
    QVncServer created on port 5900

    I haven't explicitly set any QT environment variable.

    Do you have any idea about how to fix this issue and make the mouse/keyboard work?

    Thank you very much!