QT & DirectFB --- using together - linux

I am working on Qt application in the linux Desktop enviromet. Most desktop Linux uses xwindows to display onto the screen.
But now I want to try my hands on DirectFB on my desktop. Related to which i have some questions :---
1> Can i make my desktop QT application to make use of DirectFB to run my QT application .
2> If yes then do i have to disable xwindow server on my desktop first Or directfb can run simultaneously.
3> Also is it the right way to configure QT for using directFB .
http://qt-project.org/doc/qt-4.8/qt-embeddedlinux-directfb.html
http://qt-project.org/wiki/DirectFBAndQt
4> How does Qt and directFB & openGL works together. Is this how communication flow occurs :---
Qt ----> OpenGL ----> DirectFB --> screen
5> Also if i install Directfb library then will it automatically come to know how to communicate with video h/w driver ?
http://en.wikipedia.org/wiki/DirectFB
Please suggest on these points.

try to inform the display plugin your Qt application should use
./qt-app -display directfb
DirectFB can create windows over X, but you need to configure it to do so (XNest or something like it)
Probably yes
Don't know
Nope, you need a plugin backend for your platform. When dealing with custom boards, usually the vendor ships the code needed to build such component

The Qt library is able to draw either on X11 or on the framebuffer without the need of the (additional) DirectFB layer. Recent versions of the library also have OpenGL support. Adding such a layer would just be a waste of time/memory/cpu.

Related

Qt 5 XCB tearing

I am running Qt 5.4.2 on a Tegra 3 with a Yocto compiled Angstrom image. Unfortunately the Tegra only has proprietary drivers and they are forcing me to use X11 for hardware acceleration. I therefore had to build Qt with XCB instead of EGLFS.
My problem is that I am seeing tearing on some QML 2 animations on the device that are not visible on my PC. I am wondering if there is anything I can do to try and get rid of this tearing? I have read that QT_QPA_EGLFS_FORCEVSYNC might help but unfortunately I can't use EGLFS and doubt if it will be of any use.
EDIT:
I have noticed that "QSGContext::initialize: stencil buffer support missing, expect rendering errors" as well as "Qt Warning: Could not find a location of the system's Compose files. Consider setting the QTCOMPOSE environment variable." come up when the application is started. Could they be related to the problem?

Qt Creator as a debuging system for Linux embedded

In our system, we write the code on C++ without using Qt libraries.Actually, we write the on Windows machine, but finaly, this code must to be rebuilded for Linux Embedded machine. At first stage we did it successfully with Makefile-s, but "old style debugging" with gdb utility killed us. So I want to use Qt Creator to debug the application.
I successfully use Qt Creator to build all libraries and applications for ARM machine(of couse I have an ARM toolchain). But I cannot remotely debug the system.
I do not understand, what I do wrong.
The questions:
1. For system debuging, do I need Qt Libraries buld for ARM machine? (as I wrote above, I do not use Qt Libraries for my applications or for my libraries)
2. Do I need to redefine Mkspec for ARM compiler?
Thanks, Slava
You generally don't need Qt libraries for your system to use Qt Creator as a debugger frontend for your plain C++ program on an embedded device. However, if you use qmake as a build system, the associated Qt version must (roughly) match your target.

What is the use of various Qt platform plugins?

I was doing some cross compiling of a Qt5.2 application for an ARM based target (TI AM335x EVM) and it was failing to display anything on my platform. After doing some google’ing I found that if I launched it with:
./helloworld -platform eglfs
it would show up (full screen, but it worked)!
I started looking at all the platform options, I found:
android, eglfs, linuxfb, minimalegl, windows, xcb, cocoa, ios, offscreen, qnx, directfp, kms, minimal, openwfd
I’m wondering what they are for. I assume, for example, that if I wanted to run my application on an Android device I’d have to pass -platform android, but they’re not all obvious to me.
Is there a listing anywhere of when each of these parameters should be used?
For example, what does eglfs stand for? And why did I need to use that where as linuxfb didn’t work? (I would have thought the linux frame buffer was how I wanted to launch my application since it was running on embedded linux)
If the linuxfb plugin doesn't work, then possibly you didn't correctly configure the framebuffer device on your system. Maybe a directf layer is already running, so you may want to try the directfb plugin instead.
If you wish to avoid having to specify the platform option when you run the executable, you can pass the default one to configure when you build Qt.
The plugins can be described as follows:
Linux plugins - those use Linux-specific input devices and various output devices
eglfs - Uses the OpenGL ES in fullscreen mode. There's no other way since OpenGL has no concept of a window manager.
directfb (not directfp) - Uses the linux frame buffer with OpenGL ES via the directfb layer (see also wikipedia). Integrates into the directfb windowing.
linuxfb - Uses the linux frame buffer in fullscreen mode. There's no other way since linuxfb has no concept of a window manager.
kms - Uses linux kernel modesetting API in fullscreen mode. There's no other way since DRM has no concept of a window manager.
openwfd - Uses an openwfd Wifi display in fullscreen mode. There's no other way since openwfd has no concept of a window manager.
Platform-independent plugins - could be made to run on any OS
xcb - Runs on an X11 server and is integrated into the X11 windowing environment. Generally it won't behave correctly without a window manager running as well. Can be made to work on Windows, given a Windows implementation of xlib, if you want to, say, serve applications from a Windows server to X11 thin terminals (typically Unix boxes).
offscreen - Renders to an offscreen buffer. Useful for rendering to custom displays.
minimal - A minimalistic backing store that optionally dumps the virtual screen to a file. Implements the bare minimum of functionality just to demonstrate how to start writing a platform plugin.
Other platform-specific plugins
android - Uses the Android APIs and is integrated into the Android environment.
windows - Uses the WINAPI and is integrated into the Windows windowing environment.
cocoa - Uses the Cocoa APIs and is integrated into the OS X windowing environment.
iOS - Uses the iOS toolkits and is integrated into the iOS environment.
qnx - Uses the QNX APIs and is integrated into the QNX photon windowing environment.
I just replied in the TI forums to the same query. If eglfs is functional and linuxfb is not, please file a bug in JIRA with qt-project.org, as both eglfs and linuxfb in AM335x use the linux framebuffer. eglfs (when used with a widget application) uses dirty-rectangle approach with a fullscreen display. Also move to QML if possible when on Qt5.
PS: you can export QT_QPA_PLATFORM=eglfs (or linuxfb) on the target to avoid setting the platform everytime you invoke the application. (http://doc.qt.io/qt-5/embedded-linux.html)
Probably the most noteworthy addition since the accepted answer was written is Qt's wayland platform, apparently since Qt 5.11 (in official binaries). Enabled now by default on Fedora 31+... which can be a little troublesome for some apps. Red Hat had to implement a fallback list.

Does linux support multi-touch screen

I'd like to develop my own app based on a arm-linux system, using QT.
I'd like my app to support multi-touch functions. And I'd like to know if it is possible. If so ,please let me know which version of Linux kernel I should use.
Linux started supporting Microsoft's Multi-touch protocol from kernel 3.8 onwards.
The reference is here:
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
Addendum
http://www.ptrackapp.com/apclassys-notes/embedded-linux-multitouch/
has arm multi-touch tutorial for iPhones but it applies equally to Android.
The hid-multitouch in linux supports a whole bunch of panels:
See
http://lxr.free-electrons.com/source/drivers/hid/hid-multitouch.c
for details
Addendum 2
Multi touch support has been somewhat there since 2.6 Ubuntu had multi touch support in its distribution in 2010.
Microsoft Multi-touch protocol support started in 3.8. Chrome OS support started in kernel v3.9. X.org server had multi touch support built into it in 2011.
Run command:
chromium --enable-pinch
for context menu
create shortcut application (.desktop)
/home/"your user"/.local/share/applications
OR
support all aplications
search:
multi touch compiz plugin
https://www.youtube.com/watch?v=rY-85BUqWgY

Using qtmotifextension with QT5

Currently I'm using qtmotifextension to connect QT world with old Motif UI on X11 Linux station.
I'm trying to update towards QT5 but X11processEvent from QApplication has been removed.
Is there an updated qtmotifextension from old qt-solutions available or is there any way to have X11processEvent from QT5?
Seems that qtmotifextension is no more maintained... You have to stick to QT4 or re-implement this extension....

Resources