Qt-interest Archive, March 2002
detecting right mouse button in QListView
Message 1 in thread
I am unable to detect the right mouse button in QListView.
I am working with a QWidget which has a QTabWidget. Each tab is a
QListView. I have implemented the contentsMousePressEvent in my QListView
class, with the intention of displaying a context menu at the mouse
location. However, this function only gets called when the left or middle
mouse button is pressed. It doesn't work with the right mouse button. (In
other parts of my code I am able to detect the right mouse button, so I know
that my mouse is working properly.) Any ideas on what I'm doing wrong?
Thanks,
Allyn
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
Message 2 in thread
Hi,
read the documentation. QListView has 2 signals, rightButtonPressed() and
rightButtonClicked() which free you of the job in finding the item/column
clicked on.
greetings
P.J.
Am Dienstag, 26. März 2002 23:43 schrieb Allyn Treshansky:
> I am unable to detect the right mouse button in QListView.
>
> I am working with a QWidget which has a QTabWidget. Each tab is a
> QListView. I have implemented the contentsMousePressEvent in my QListView
> class, with the intention of displaying a context menu at the mouse
> location. However, this function only gets called when the left or middle
> mouse button is pressed. It doesn't work with the right mouse button. (In
> other parts of my code I am able to detect the right mouse button, so I
> know that my mouse is working properly.) Any ideas on what I'm doing
> wrong?
>
> Thanks,
> Allyn
>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
[ signature omitted ]