3

I am developing a application with Qt. I have a push button and I'm using signal/slot for setting a different text.

The problem is that I want to use it with touch screen. I have the coordinates when I touch the screen. So far I can change the text by pressing on the touch screen (any coordinate) but I don't know how to do it only when I push the button.

If you have any ideas I would appreciate it.

Thanks

NG_
  • 6,895
  • 7
  • 45
  • 67
Hanelore Ianoseck
  • 594
  • 1
  • 5
  • 12
  • 1
    Could you show us any code/details, the operating system you're on, etc.? Usually a touch screen device is handled like any other pointer device (i.e. mouse or drawing tablet), so you should be able to just "press" the button without having to worry about coordinates. – Mario Aug 31 '12 at 14:23

1 Answers1

2

Touch events are commonly handled just like mouse clicks (it depends on the Qt driver you're using but it commonly is handled that way). So use the pressed() signal as usual.

Luca Carlon
  • 9,546
  • 13
  • 59
  • 91
  • 1
    Thanks for the answer but I just forgot to write something in my code and believed that something else is wrong. Everything works just fine now. – Hanelore Ianoseck Sep 03 '12 at 14:08