I have a slot to handle the QTreeWidget::itemClicked signal.
I also want to find out which mouse button caused the signal to be emitted.
Using QApplication:mouseButtons() in my sample below always gives a
value of '0' for buttons.
The problem with using QApplication::mouseButtons() is that the
itemClicked signal is not emitted until the mouse button is released.
Any ideas on how to achieve this would be most appreciated.
void MyClass::handleItemClicked(QTreeWidgetItem *item, int column)
{
Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers();
Qt::MouseButtons buttons = QApplication::mouseButtons();
....
}
Thanks,
Mark
--
************************************
Mark Thompson
Seattle, WA
http://www.arguslab.com
mark@xxxxxxxxxxxx
************************************
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|