Results 1 to 2 of 2

Thread: How to set QTouchEvent::TouchPoint primary?

  1. #1

    Default How to set QTouchEvent::TouchPoint primary?

    Hi to everybody,

    I'm trying to simulate QTouchEvents by creating myself TouchPoints. I was wondering how I can set them primary, since isPrimary() exists, but setPrimary() does not exist.

    isPrimary() is not even virtual so I think I cannot try to subclass the TouchPoint class and reimplement it.

    I was also wondering why the QTouchEvent::TouchPoint constructors are not published in the docs also if they exist.

    Qt Code:
    1. /usr/include/qt4/QtGui/qevent.h:739: note: candidates are: QTouchEvent::TouchPoint::TouchPoint(const QTouchEvent::TouchPoint&)
    2. /usr/include/qt4/QtGui/qevent.h:738: note: QTouchEvent::TouchPoint::TouchPoint(int)
    To copy to clipboard, switch view to plain text mode 

    Has anybody any idea?

    Thanks in advance.

    Elindros

  2. #2
    Join Date
    Jan 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to set QTouchEvent::TouchPoint primary?

    It is encoded in the state:

    Qt Code:
    1. event.setState(Qt::TouchPointPrimary)
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. How to simulate QTouchEvent using mouse
    By dpatel in forum Qt Programming
    Replies: 5
    Last Post: 28th April 2016, 01:40
  2. QTouchEvent Not Sending
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th November 2010, 09:45
  3. QTouchEvent and State Machine Framework
    By acano in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2010, 07:58
  4. Multiple widgets to receive QTouchEvent
    By jlin in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2009, 04:37
  5. PRIMARY Selections
    By hayati in forum Newbie
    Replies: 9
    Last Post: 12th September 2006, 12:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.