Build Qt with -qt-gfx-vnc



  • Hi,

    I am cross compiling Qt 5.8.0 for raspberry pi. Following is my configure command.

    ./configure -opengl -icu -openssl -qt-gfx-vnc -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/RaspberryPi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -qreal float -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi

    Without -qt-gfx-vnc it was fine but, I want to build my qt library with qt-gfx vnc. I am getting following error while configuring Qt.

    ERROR: Unknown command line option '-qt-gfx-vnc'.

    What does this error mean? Is there any way to compile qt with -qt-gfx-vnc?
    0_1504958762863_Screenshot_20170909_172850.png

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That's an old option for Qt 4, it doesn't exist with Qt 5. However there's a VNC backend for Qt 5 too.



  • Hi,

    Thanks for the information.

    Would you please tell me that how should I enable/build vnc backend in Qt 5.4.1 for raspberry pi?


  • Lifetime Qt Champion

    If you stay with 5.4.1, you can't. It has been added in Qt 5.8 IIRC.



  • Hi

    I have tried to build qt-gfx-vnc with qt 5.8.0 version. See above picture. It was throwing error in qt 5.8.0. Please tell me which version should I try to fix this issue.


  • Lifetime Qt Champion

    Again, -qt-gfx-vnc is not a valid option value for Qt 5, whatever the minor release number is.

    You may have to compile the plugin by hand.

    By the way, why go with 5.8 rather than the latest available if you upgrade anyway ?



  • Hi,

    Thanks for the quick reply. If you have any source code url of vnc plugin then please share with me. I will compile it by hand.

    I have downloaded qt 5.9.0. While configuring got following error ./configure : /bin/sh^M : bad interpreter. So, I switched to qt 5.8.


  • Lifetime Qt Champion

    The current version is 5.9.1 which 5.9.2 not so far in the future.

    Looks like you downloaded the zip version which has Windows line endings. Download one of the other type of archives.



  • Hi,

    From where do I get the vnc plugin source code? If you have any vnc plugin source URL then kindly share with me.

    Thanks


  • Lifetime Qt Champion

    Did you try to look into the sources ?

    It's under qtbase/src/plugins/platforms/vnc



  • Hi

    Qt/qt-everywhere-opensource-src-5.8.0/qtbase/src/plugins/platforms/vnc$ ls

    main.cpp qvncclient.cpp qvncclient.h qvnc.cpp qvncintegration.cpp qvncintegration.h qvnc_p.h qvncscreen.cpp qvncscreen.h vnc.json vnc.pro

    Yes, It's there. So, I want to compile this module manually right? After compile how do I test vnc server? Let me know the method of test.

    Thanks


  • Lifetime Qt Champion

    Don't forget to install it.

    Then: ./your_application -platform inc



  • Hi,

    I have run qt vnc by exporting following environment variable.

    export QT_QPA_PLATFORM=vnc

    Now, My application is using opengl widget to display video. I have compiled Qt by passing argument -opengl. So, When I am running vnc server with my application. I am getting following error. Also, my application was not able to display UI on server screen. It only shows desktop instead of full screen Qt UI.

    ./wellostation -platfrom vnc:5900

    This plugin does not support createPlatformOpenGLContext!
    This plugin does not support createPlatformOpenGLContext!
    QOpenGLWidget: Failed to create context
    This plugin does not support createPlatformOpenGLContext!
    QOpenGLWidget: Failed to create context
    QVncServer created on port 5900

    Thanks


  • Lifetime Qt Champion

    So basically you want to have several output at the same time ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.