PDA

View Full Version : touchscreen API



rbp
20th November 2008, 00:24
hello,

Does anyone have experience using touchscreens with QT?
I've seen lots of talk about how to configure the touchscreen for QT, but once this is done can you treat the touchscreen input just like a mouse with the click events and so on?

Richard

aamer4yu
20th November 2008, 06:28
I am not sure how much it will help, but u can check Tablet demo in Qt Demos -> Widgets

nicolas1
20th November 2008, 08:21
what problem is with touchscreen? process mouse events.

rbp
20th November 2008, 08:49
what problem is with touchscreen? process mouse events.

so from your experience does a touchscreen produce mouse events, such as QEvent::MouseButtonPress, QEvent::MouseButtonRelease, etc?
That's what I want to confirm.

^NyAw^
20th November 2008, 08:54
Hi,

[QUOTE]
so from your experience does a touchscreen produce mouse events, such as QEvent::MouseButtonPress, QEvent::MouseButtonRelease, etc?
That's what I want to confirm.
[QUOTE]

As I know, touchscreen only acts as a simple mouse connected to USB or serial port. Don't know why you have to configure touchscreen for Qt. It's just a mouse.

rbp
20th November 2008, 09:06
Hi,
As I know, touchscreen only acts as a simple mouse connected to USB or serial port.

That's what I expect, but I want to confirm from someones experience before I buy one.


Don't know why you have to configure touchscreen for Qt. It's just a mouse.
On Linux, which is my platform, there is some configuration involved according to the discussions I saw.

^NyAw^
20th November 2008, 09:27
Hi



On Linux, which is my platform, there is some configuration involved according to the discussions I saw.


I really don't understand why. The OS will process the touchscreen input as a mouse, so if your Qt application is responding to a simple mouse, why you have to configure Qt to use a touchscreen? Do you understand me? It is a MOUSE, the hardware is different but it gets x and y positions to the operating system. Maybe I'm mistaken.

rbp
20th November 2008, 10:48
Hi
I really don't understand why. The OS will process the touchscreen input as a mouse, so if your Qt application is responding to a simple mouse, why you have to configure Qt to use a touchscreen? Do you understand me? It is a MOUSE, the hardware is different but it gets x and y positions to the operating system. Maybe I'm mistaken.

in this thread (http://www.qtforum.org/article/13230/more-touchscreen-issues.html) for example it was said:


my touchscreen is now working. Turns out after a week of debugging all that need to be done was comment out certian lines of code. I commented out anything that had to do with the IPAQ in qmouselinuxtp.cpp but this is the line that was holding everything up.
# if defined(QT_QWS_IPAQ_RAW) || defined(QT_QWS_EBX_RAW)
mousePos = handler->transform( mousePos );
# endif

Nyaw, thank you for responding but I'm after actual experience. I agree that it should work in theory.

^NyAw^
20th November 2008, 11:05
Hi,

So you are using Qtopia, right? Then I think that you need to configure the touchscreen as you said, but really you are configuring the mouse of the IPAD to be responsing on the virtual framebuffer.

I'm using Qt4 application on Windows using a touchscreen and it acts as a mouse. So I said that it work. ;)

rbp
20th November 2008, 11:09
oh, you're already using it with the mouse API.
Thanks - that's what I wanted to know.