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. How to implement mouse gesture by qt
QtWS25 Last Chance

How to implement mouse gesture by qt

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.7k Views
  • 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.
  • R Offline
    R Offline
    redstoneleo
    wrote on last edited by
    #1

    what I wanna perhaps like this:
    when a right mouse button is pressed and we go down and right with a cursor. As in letter ‘L’. Our mouse gesture will close the window.

    I think Qt already have framework for mouse gesture .see here
    http://doc.qt.digia.com/qt/gestures-overview.html
    Although I cannot make use of the knowledge there due to a lack of Qt programming experience ,but I still think it can helps us simplify the mouse gesture program design.
    please forgive my greedy request ,can you give me an code example ?

    I googled such gesture examples on Qt4 ,but hard to find one ,so your help will be greatly appreciated !
    thanks inadvance !

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sam
      wrote on last edited by
      #2

      Hi,

      You can take a look at "this":http://qt-project.org/forums/viewthread/18613/ thread, there are some links for tutorials and implementations.

      You need to subclass "QGestureRecognizer":http://qt-project.org/doc/qt-5.0/qtwidgets/qgesturerecognizer.html class and create a custom gesture to handle the required effect.

      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