Results 1 to 10 of 10

Thread: Qt 5.2.0 Opensource with Linux Framebuffer

  1. #1
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Qt 5.2.0 Opensource with Linux Framebuffer

    Hello everybody!

    I'm using Qt 5.2.0(Not Qt Embedded) on a Raspberry Pi crosscompiled over a Computer running Linux.
    There is a small display(320x240) attached to the Raspberry Pi. The driver of the display is using Linux Framebuffer.
    If I develop QML-Applications with Qt Creator on my desktop, they will only be displayed if i run a fbcp daemon which copys all content from /dev/fb0 (the default framebuffer) to /dev/fb1 (the attached display).
    How can i configure Qt to display on the /dev/fb1 framebuffer-device?


    nasenfahrrad7

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    You can try passing the device as an argument to the platform plugin.

    Something like

    Qt Code:
    1. yourprogram -platform linuxfb:fb=/dev/fb1
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  3. #3
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    Thanks for your effort!
    I tried to make it like you described it in your Post.
    I receive the following error:

    This plugin does not support createPlatformOpenGLContext!
    QtQuick: failed to create OpenGL context

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    Maybe you are normally using a different QPA pluginß EGLFS maybe?

    Cheers,
    _

  5. The following user says thank you to anda_skoa for this useful post:

    nasenfahrrad7 (28th June 2014)

  6. #5
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    Yes, you're right.
    On program-start there are alerts starting with EGLFS
    What does that actually mean?
    Do I had to pass special parameters to configure command when I compiled the qt-framework?

  7. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    I am not sure how the default QPA can be specified at configure time, it migth be something that is derived from qmakespec files.

    During runtime you can specify the name of the QPA plugin through either
    - environment variable QT_QPA_PLATFORM
    - commandline switch -platform

    Your current setup seems to select the EGLFS plugin, probably using a build time default, but you can check if the environment variable is set.

    The EGLFS plugin also has the possibility to be pointed to a different FB device: setting the environment variable QT_QPA_EGLFS_FB

    So as it seems that EGLFS works for you in general, you could adjust the framebuffer device like this
    Qt Code:
    1. export QT_QPA_EGLFS_FB=/dev/fb1
    2. yourprogram
    To copy to clipboard, switch view to plain text mode 
    or
    Qt Code:
    1. QT_QPA_EGLFS_FB=/dev/fb1 yourprogram
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  8. #7
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    Thanks a lot for the information!

    I tried all your solutions, but the Pi does everytime the same thing.
    For example I called my program like that:
    Qt Code:
    1. ./myprogram -platform linuxfb LinuxFb:fb="/dev/fb1"
    To copy to clipboard, switch view to plain text mode 
    and like
    Qt Code:
    1. QT_QPA_EGLFS_FB=/dev/fb1 ./myprogram
    To copy to clipboard, switch view to plain text mode 
    .
    What the pi does is actually surprising: First, the cursor is blinking; and then it(the cursor) just disappears. The pi doesn't handle any key events passed by the attached keyboard, but I can login via ssh. It seems like this is no Qt Problem anymore. I think its a problem with the Framebuffer-Driver. I already tried to switch console via <Ctrl>+<Alt>+<F2> or <Ctrl>+<Alt>+<F7>, but nothing happens
    nasenfahrrad7

  9. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,420
    Thanks
    37
    Thanked 1,545 Times in 1,495 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    Quote Originally Posted by nasenfahrrad7 View Post
    Thanks a lot for the information!

    I tried all your solutions, but the Pi does everytime the same thing.
    For example I called my program like that:
    Qt Code:
    1. ./myprogram -platform linuxfb LinuxFb:fb="/dev/fb1"
    To copy to clipboard, switch view to plain text mode 
    Ah, so your tried adding a commandline option to your own program?


    Quote Originally Posted by nasenfahrrad7 View Post
    The pi doesn't handle any key events passed by the attached keyboard, but I can login via ssh. It seems like this is no Qt Problem anymore. I think its a problem with the Framebuffer-Driver.
    Probably, or with the input event system.

    Have you determined which QPA plugin gets loaded when you don't override anything?
    Was it the EGLFS one?

    Cheers,
    _

  10. #9
    Join Date
    Jun 2014
    Posts
    5
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    I think It's the EGLFS-plugin, but i'm not sure. Where can I find that out?
    But anyway, the pi doesn't display anything.
    What would you do?

    nasenfahrrad7

    PS:
    I'm abled to display a Desktop(In this case LXDE).
    Is it possible to solve the problem over the xserver?

  11. #10
    Join Date
    Mar 2015
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Android

    Default Re: Qt 5.2.0 Opensource with Linux Framebuffer

    I had this same exact problem.

    The problem is likely that you are using qt quick 2, which requires OpenGL. OpenGL does not support the frame buffer used for the small display.

    Similar discussion found here:
    http://raspberrypi.stackexchange.com...g-qt5-on-pitft
    https://forums.adafruit.com/viewtopic.php?f=47&t=57557

    A solution would be to use qt quick 1 or qt widgets.

Similar Threads

  1. Is qt-sdk-linux-x86-opensource-2010.04.bin broken?
    By redrabbit in forum Installation and Deployment
    Replies: 4
    Last Post: 20th August 2010, 15:32
  2. Install qt-sdk-linux-x86-opensource-2009.02.bin at Fedora 10
    By wisconxing in forum Installation and Deployment
    Replies: 1
    Last Post: 29th June 2009, 15:40
  3. errors with compiling qt-embedded-linux-opensource-4.4.3
    By dycjiaoda in forum Installation and Deployment
    Replies: 4
    Last Post: 17th April 2009, 16:56
  4. Linux Framebuffer Test Problem
    By jefflg in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 19th May 2007, 08:06

Tags for this Thread

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.