[Qt-interest] QListView clicked mouse button

R. Reucher rene.reucher at batcom-it.net
Fri Feb 27 12:39:19 CET 2009


On Fri February 27 2009 11:47:07 Jesús Fernández wrote:
> Hi,
>
> I need to know what was the mouse button clicked when a QListView::clicked
> signal is emitted.
>
> How can I know the button.
AFAIK, not via the signal... you have to reimplement

void QWidget::mousePressEvent(QMouseEvent *)

to access

Qt::MouseButton QMouseEvent::button()

and "remember" the pressed button to have it available when the slot is 
called.

There may be an easier way, but I'm not aware of any...

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

Five is a sufficiently close approximation to infinity.
		-- Robert Firth




More information about the Qt-interest-old mailing list