[Interest] [Development] Qt 5.4 multi-touchscreen problem.
Shawn.Rutledge at theqtcompany.com
Wed Feb 25 08:04:52 CET 2015
On 24 Feb 2015, at 00:18, Jereme Lamothe <jlamothe at docboxinc.com> wrote:
> I went through this process as well. The Qt libraries that ship w/ the
> SDK (at least as of 5.3) are built against XInput 2.0, which is too
> early for multi-touch support. In order to support touch events, I
> downloaded the xinput 2.2 libraries / headers from the ubuntu
> repositories and compiled Qt from source. I'm away from my linux
> laptop at the moment, so am unable to say the exact package name, but
> they're present in the official repos as of at least Ubuntu 12.04.
Indeed that’s one problem (QTBUG-35583): it’s actually built on Ubuntu 11.10 which has XInput 2.1 headers. 12.04 is new enough to have 2.2. But now we are planning to do “universal” Linux builds on RedHat 6.5. The builds from Ubuntu 11.10 happened to be compatible with some other older distros; but if we do the build on RedHat, the result should be more portable to both older and newer distros of various kinds. I have tested such a build on Ubuntu 14.04 and Centos 6.6, and multi-point touch is working. So we can expect this problem to be solved for the 5.5 release. Please test the beta when it becomes available.
There are also long-standing bugs in the gesture framework, as well as limitations of its design. (Try qtbase/examples/widgets/gestures/imagegestures: you will see that two fingers are required to do anything, because we have unsolved problems preventing us from enabling single-finger panning or swiping by default; and there’s still a bug with pinch zooming too.) But usually you are better off writing multi-touch applications with Qt Quick anyway. It doesn’t make any use of QGestureEvents so far.
> On Mon, Feb 23, 2015 at 5:42 PM, Celal SAVUR <c.savur at gmail.com> wrote:
>> Hello Everybody,
>> I am trying to use a multi-touch screen with my qt application. I have
>> downloaded the qt 5.4 for Linux (Ubuntu 14.04). But unfortunately Gesture
>> event does not deliver to the event function.
>> My goal to catch swipe gesture then assign some task to do so.
Maybe it wouldn’t be too hard to detect a swipe by handling touch events directly instead of expecting QGestureEvents. But in QtQuick a swipe is normally used to manipulate something visually: you can swipe a Flickable, ListView, GridView or PathView, for example.
>> I tried to download Qt 5.4 source code then compile myself but anytime I try
>> to configure the source file the flag was "mtdev no". After my research, I
>> have discovered Qt required xinput 2.2 and higher but ubuntu 14.04 using
Ubuntu 14.04 is definitely new enough, as long as you have installed libxi-dev (which depends on x11proto-input-dev). The version 1.6.xx (or 126.96.36.1991-lubuntu1 on my 14.04 system) is not the same as the XInput protocol version. You can check like this:
$ grep -i minor /usr/include/X11/extensions/XI2.h
#define XI_2_Minor 3
That’s provided by the x11proto-input-dev package. So we have headers describing the XInput 2.3 version, which is newer than 2.2, which is where multi-point touch support was added, and therefore the 2.2 is the minimum version that Qt needs to be built with in order to know how to handle touch events from the server.
mtdev is probably not needed.
>> One interesting thing is that gesture (just touchbegin, touchpdate,
>> touchend) is working with Qt 4.8 but not working Qt 5.4. I want to use
>> Qgesture class but it does not work either 4.8 nor 5.4.
>> I have spent too much time to fix this problem, but I could not. I need
>> someone to help me to overcome this problem.
>> Thank you in advance.
>> Development mailing list
>> Development at qt-project.org
> Interest mailing list
> Interest at qt-project.org
More information about the Interest