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
Re: Qt 5.2.0 Opensource with Linux Framebuffer
You can try passing the device as an argument to the platform plugin.
Something like
Code:
yourprogram -platform linuxfb:fb=/dev/fb1
Cheers,
_
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
Re: Qt 5.2.0 Opensource with Linux Framebuffer
Maybe you are normally using a different QPA pluginß EGLFS maybe?
Cheers,
_
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?
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
Code:
export QT_QPA_EGLFS_FB=/dev/fb1
yourprogram
or
Code:
QT_QPA_EGLFS_FB=/dev/fb1 yourprogram
Cheers,
_
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:
Code:
./myprogram -platform linuxfb LinuxFb:fb="/dev/fb1"
and like
Code:
QT_QPA_EGLFS_FB=/dev/fb1 ./myprogram
.
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
Re: Qt 5.2.0 Opensource with Linux Framebuffer
Quote:
Originally Posted by
nasenfahrrad7
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:
Code:
./myprogram -platform linuxfb LinuxFb:fb="/dev/fb1"
Ah, so your tried adding a commandline option to your own program?
Quote:
Originally Posted by
nasenfahrrad7
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,
_
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?
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.