[Qt-interest] Events on QTreeView.
Shabd Swarup V
shabd at cadence.com
Mon Feb 16 12:43:10 CET 2009
Actually, I do not need to catch the event, rather I need to trigger these events from within the code.
Basically, I am trying to simulate user behavior. Do you think that is possible using the below mentioned API?
Thanks,
Shabd
From: Jesús Fernández [mailto:jsfdez at gmail.com]
Sent: Monday, February 16, 2009 5:09 PM
To: Shabd Swarup V
Subject: Re: [Qt-interest] Events on QTreeView.
You need to reimplement the virtual protected functions:
· QAbstractItemView::mousePressEvent
<http://doc.trolltech.com/4.4/qabstractitemview.html#mousePressEvent>
· QAbstractItemView::mouseDoubleClickEvent <http://doc.trolltech.com/4.4/qabstractitemview.html#mouseDoubleClickEvent>
In the first reimplementation check the function QInputEvent::modifiers <http://doc.trolltech.com/4.4/qinputevent.html#modifiers> to know what key is pressed.
On Mon, Feb 16, 2009 at 12:18 PM, Shabd Swarup V <shabd at cadence.com> wrote:
Hi,
I need to send the following Keyboard + Mouse events on a particular index (QModelIndex) of a QTreeView:
1. Double click
2. Control-Click
3. Shift-Click
Kindly let me know how to go about this.
Thanks in advance.
Regards,
Shabd
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090216/e57d6e62/attachment.html
More information about the Qt-interest-old
mailing list