×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    38

    Question how to act on Touch on QGraphicsView?

    Hi,

    this might be an embarrassing question for a Nokia device developer but I couldn't find how one processes touches on a Touch Screen. I searched Google for qt touch * (* = I tried several words) and qt mouse events but all I found was that mouse events are not signal based. But how do I act on them?

    QGraphicsView has a QGraphicsScene which has several Items. Reading their documentation, event handling is written about but all functions are virtual: I would have to subclass and implement myself.

    I have a QGraphicsView put onto the default centralWidget with Qt Designer. Now, I want a certain method be executed when I touch the QGraphicsView (or one of its icons, I could do my own object touched finding algorithm).

    What do I have to do?

    Thank you already for pointers.

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: how to act on Touch on QGraphicsView?

    You will have to subclass QGraphicsView and implement as you already mentioned.
    or add scene with items to view and work on the signals, events available for them.

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    38

    Re: how to act on Touch on QGraphicsView?

    I subclassed an Item class and implemented its mousePressEvent method. I hope this catches the touch screen presses too. This did seem to be the only way. Thank you!

Similar Threads

  1. How to invode touch functionality in touch screen mobiles
    By j2me_beginner in forum Mobile Java General
    Replies: 0
    Last Post: 2009-09-30, 14:04
  2. Replies: 1
    Last Post: 2009-04-02, 07:50
  3. alternative to multi touch - zoom and rotate control on single touch
    By shpe11 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 11
    Last Post: 2009-03-28, 19:14
  4. multi-touch alternative for single-touch mobile devices - RELEASE (alpha))
    By shpe11 in forum [Archived] Flash Lite on Nokia Devices
    Replies: 1
    Last Post: 2009-03-28, 19:14
  5. Replies: 2
    Last Post: 2009-03-28, 18:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×