Distinguish between single and double click events in Qt

Posted by Jesse on Stack Overflow See other posts from Stack Overflow or by Jesse
Published on 2011-01-07T15:52:03Z Indexed on 2011/01/07 17:54 UTC
Read the original article Hit count: 217

Filed under:
|
|

I have a QAbstractItemView that needs to react to single and double click events. The actions are different depending on whether it was single clicked or double clicked. The problem that is occurring is that the single click event is received prior to the double click event.

Is there a recommended way/best practice for distinguishing between the two? I don't want to perform the single click action when the user has actually double clicked.

I am using Qt 4.6

© Stack Overflow or respective owner

Related posts about c++

Related posts about qt