[Qt5.0] Use two fb devices at the same time in Qt5.0 app
I would like to create a single Qt5.0 app that has a control menu on fb1 and displays media content on fb0. Is it possible to do that?
not sure if you can do it with one app instance, but I think it will be possible with 2 separate processes. You can always communicate between them through IPC or RPC...
Thanks for your quick reply!
In that case, I need to switch display output. Could you please show me how to switch display output between fb0/1 with EGLFS platform?
I'm not familiar with EGLFS, but if you look into qtbase/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp you can find this function:
@const char *QEglFSHooks::fbDeviceName() const
play with it, or just copy-paste platform plugin code and compile it like eglfs_fb1... should work...
It does not work. It always uses fb0 for displaying. It seems that the above code snippet is used for referring screen size and color depth only. ????
I can use "-platform linuxfb:fb"/dev/fb1"" to display on fb1. however touch input dies and the app is only displayed a part.
have you met those errors?
nope, I have only played with virtual framebuffers using Qt4 and it has worked well in my project... but I didn't use inputs or whatsoever...
Look at qeglfshooks_x11.cpp and other files in eglfs platform plugin, there is not that much code...
prabindh last edited by
This really depends on the EGL implementation of your GPU vendor and not on Qt5. Check with the vendor if there are any extensions exposed to select this.
agocs last edited by
Yes, to have EGL/GLES on another display you need modifications not just to the base eglfs code but also the board-specific hooks in qtbase/mkspecs/devices.
In 5.3 we'll be introducing QT_QPA_EGLFS_FB to choose the framebuffer/dislay but for the time being that will be effective for i.MX6 only.
Are you using i.MX6? There the eglfs on fb0, linuxfb on fb2 approach is known to work. (but keep in mind that fb1 is incorrect since that's the overlay for fb0 and has nothing to do with the other display)