Search code examples
qt4qlistview

QListView clicked mouse button


I need to know what was the mouse button clicked when a QListView::clicked signal is emitted.

How can I know the button.


Solution

  • If you are not interested in subclassing, you can also create an event filter class and install that filter onto the object in which you want to listen to (in this case, the QListView).

    For more information look at QObject::installEventFilter().