[Qt-interest] double clicking on a QHeaderView Item

Jainish Jain Jainish_Jain at persistent.co.in
Sat Apr 24 08:49:28 CEST 2010


Hi David,

If you have subclassed QHeaderView then you can reimplement QWidget::event(QEvent *) function to get the event before it passed on and invoke the signal.

If you haven't subclassed QHeaderView then you can installEventFilter on QHeaderView and then take the appropriate action based on whether it was double click on single click.

-Jainish
________________________________________
From: qt-interest-bounces at trolltech.com [qt-interest-bounces at trolltech.com] On Behalf Of David Boosalis [david.boosalis at gmail.com]
Sent: Saturday, April 24, 2010 1:29 AM
To: QtInterest
Subject: [Qt-interest] double clicking on a QHeaderView Item

Hi.
I have a QTreeView for which I recently add a slot to catch its QHeaderView::sectionDoubleClicked(int). The trouble is that after or before it gets into my slot it toggles the order on the header from ascending to decending and vice versa.  I want the toggle behavior but only for a single click.

How can I capture a double click on a header view section and not get a single click

Thanks for any help you can provide.

-David


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.




More information about the Qt-interest-old mailing list