Results 1 to 10 of 10

Thread: Platform plugins and XCB question

  1. #1
    Join Date
    Sep 2014
    Posts
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Platform plugins and XCB question

    Hi everyone,

    unfortunately i couldn't get any help on the qt-project forum, so i'd like to try it here as well.
    i could need some help to better understand the platform concept (eglfs, xcb).


    My system
    I crosscompiled Qt5.3 on my linux debian desktop and i use QtCreator to write QML code and deploy it to my raspberry pi.


    My goal:
    A program that runs on the rpi, but the gui is shown on my Win7 desktop computer.
    -> I want to use QML quick 2.0 and quick.controls
    -> I was thinking about a putty ssh / X11 connection and XMing on Win7


    My available platform plugins after compiling qt5 for the raspberry:
    • eglfs
    • minimalegl
    • offscreen
    • linuxfb
    • minimal



    Questions:
    1. The eglfs plugin doesn’t support X11, right?
    2. Does XCB support X11?
    3. If (2) is true, then where do i get the xcb plugin for my raspberry?
    4. Is there another plugin that is better suited for my goal than the xcb plugin?



    Thanks so much for your help,
    Ben

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform plugins and XCB question

    Quote Originally Posted by ben80 View Post
    The eglfs plugin doesn’t support X11, right?
    Right.
    Does XCB support X11?
    Yes.
    If (2) is true, then where do i get the xcb plugin for my raspberry?
    Not sure what you mean. However X11 on raspberry pi really sucks so try avoiding it if you are after good performance.
    Are there binaries for raspbian/wheezy? Where?
    No idea. If you can't find them in the repositories then probably no.
    Can i compile it myself?
    Sure.
    How?
    Well... you would probably have to build Qt yourself and make sure all dependencies for building xcb were met.

    Is there another plugin that is better suited for my goal than the xcb plugin?
    In general if you want to show the output of rpi app on Windows then going through X11/SSH will give you terrible performance. Unless you have some solution to transfer the framebuffer data to the Windows host efficiently, I'd probably suggest implementing a custom platform plugin that would somehow provide means to do it, e.g. by writing to some virtual framebuffer (shared memory segment?) which would be accessed by some service you could connect to from the Windows host.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2014
    Posts
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    In general if you want to show the output of rpi app on Windows then going through X11/SSH will give you terrible performance
    Ok good to know.
    All i need is, to show a small window where the user can change some program settings, that's it.
    I already tried X11 on the RPI with the "NetSurf GTK web browser". The performance is enough for my needs.


    where do i get the xcb plugin for my raspberry?
    Can i compile it myself?

    >Not sure what you mean.
    >Well... you would probably have to build Qt yourself and make sure all dependencies for building xcb were met.
    I already compiled qt5 for the rpi. Thus I got the following platform plugins. eglfs, minimalegl, offscreen, linuxfb, minimal.
    But no XCB.

    So, is the XCB source code part of the qt5 source? I cannot find it.
    Do i have to compile it the same way like other qt5 modules, e.g. "qtdeclarative": -> qmake, make, make install

    Ben

  4. #4
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    When you run ./configure script of your Qt sources then it prints the setup at the end and there you can check what is going to be compiled and what is not, because some dependencies are not met. So yes, the xcb platform plugin is there in Qt sources and you probably have to have some libxcb1-dev package installed on the Pi (if you are using Raspbian) and I prefere using -qt-xcb switch with Qt's ./configure script (so it uses xcb sources bundled with Qt). You can add -v option to configure to see what tests fail and why.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  5. #5
    Join Date
    Sep 2014
    Posts
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    ok, i am close to giving up. I guess i am not enough familiar with compiling for linux devices.
    I understand that i have to rebuild my qt5, what i already did but it doesn't work for me.

    I tried to do the following steps:


    1) configure:
    Using the option -qt-xcb:
    Qt Code:
    1. niki@debian:~/opt/qt5/qtbase$ sudo ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-relocations -reduce-exports -release -make libs -prefix /usr/local/qt5pi -qt-xcb -v > outputConfigure.txt
    To copy to clipboard, switch view to plain text mode 

    2) make & make install
    Qt Code:
    1. sudo make
    2. sudo make install
    To copy to clipboard, switch view to plain text mode 
    Then i would expect to find the platform plugin XCB in the folder: /usr/local/qt5pi/plugins/platforms/ -> but it's not!!
    There are a bunch of errors and warnings, but these were also there when i compiled qt5 the first time.


    3) Copy to sd-card
    After the steps above i would copy the rasp-pi-rootfs folder to my sd-card of the raspbery.

    4) install xcb dependencies
    On my raspberry i would: sudo apt-get install libxcb1-dev

    5) compile and deploy my code to the raspberry using QTcreator

    6) run
    ./myApp -platform xcb


    I really appreciate your help!
    I know it's not easy to work through my problem description.

    Ben
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    How the libxcb1-dev package can be available in step 1 when you installed it in step 3? Did you check what is in file outputConfigure.txt? First of all it said that configuring failed so builind Qt then was pointless. Then it said:
    Qt Code:
    1. The test for linking against libxcb failed!
    2. You might need to install dependency packages for libxcb.
    3. See src/plugins/platforms/xcb/README.
    To copy to clipboard, switch view to plain text mode 
    Did you checked this file?

    And remember to install packages first on the RPi and then copy the sdcard to your sysroot dir, because they are needed in the compile time.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Platform plugins and XCB question

    Quote Originally Posted by ben80 View Post
    Ok good to know.
    All i need is, to show a small window where the user can change some program settings, that's it.
    Then maybe it is better to expose some network service on Pi and connect to it using a separate Windows-only program that will show the UI and pass user settings to the service over network.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Sep 2014
    Posts
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    How the libxcb1-dev package can be available in step 1 when you installed it in step 3?
    And remember to install packages first on the RPi and then copy the sdcard to your sysroot dir, because they are needed in the compile time.
    Good hint, it's kind of logical but i didn't think of it.

    I think i will compile a clean version from scratch, since i wanted to use the newest qt5 version anyway.

    Do you think i can use chroot to install all needed packages into the raspbian image on my host pc?
    That way, i don't have to copy the image back and forth to the sd-card. My raspberry is built into another mechanical frame where it's not easily accessible.

  9. #9
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    Never tried chroot - you may check it. But surely you can mount the running Pi sysroot trough the ethernet (with nfs) so you will have the "live" image of it.

    But for your task I would really consider the solution mentioned by wysota as the remote X connection on windows looks like the most complicated solution.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  10. #10
    Join Date
    Sep 2014
    Posts
    11
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Platform plugins and XCB question

    ok, i understand.
    I think i will look again at both solutions as soon as my son gives me a bit spare time ;-)
    But i will rebuild qt5 anyway, since i would like to work with the newest version.

    Thanks guys

Similar Threads

  1. Replies: 2
    Last Post: 18th October 2011, 15:54
  2. Replies: 1
    Last Post: 10th March 2011, 15:37
  3. Replies: 3
    Last Post: 13th October 2009, 15:31
  4. Newbie question regarding multi platform development
    By bronkopavel in forum Installation and Deployment
    Replies: 2
    Last Post: 15th September 2008, 10:08
  5. Plugins question/problem
    By Royceybaby in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2006, 15:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.