Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Guesture for widgets

Guesture for widgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 335 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by Andy314
    #1

    Hello,
    I develop a app for a tablet. Until now I use only the click-event of the widgets (buttons). Now I need a more advanced user interface : Processing of Long-touch and swipe left/right events.
    It is not really clear form me how to implement this. I found that I must overwrite the event function like below.

    bool MyWidget::event(QEvent *event)
     {
         if (event->type() == QEvent::Gesture)
             return gestureEvent(static_cast<QGestureEvent*>(event));
         return QWidget::event(event);
     }
    

    Does this mean that the standard widgets do not support gestures in general and I must subclass all widgets and take this new widget for my projects?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved