[Qt-interest] How to capture globally the mouse release event in QWS
yi xia
max.xiayi at gmail.com
Wed Oct 28 05:04:14 CET 2009
Hi All,
I wanna capture globally mouse release event in QT, the following is my
code, I can do it in X11, but when in QWS, it seems that for QWSEvent,
there is only a Mouse event, I need mouse release event.
Please also see my question in the following code.
#if defined(Q_WS_X11)
bool MyQApplication::x11EventFilter( XEvent * qevent)
#endif
#if defined(Q_WS_QWS)
bool MyQApplication::qwsEventFilter( QWSEvent * qevent)
#endif
{
#if defined(Q_WS_X11)
if( qevent->type == KeyPress )
{
}
else if(qevent->type == ButtonPress)
{
}
#endif //Q_WS_X11
#if defined(Q_WS_QWS)
if( qevent->type == QWSEvent::Key)
{
QWSKeyEvent *event = (QWSKeyEvent*)qevent;
if(event->simpleData.is_press)
{
}
}
else if(qevent->type == QWSEvent::Mouse) // how to capture MouseRelease
event?
{
TRACE("MyQApplication::QWSEvent qevent->type == QWSEvent::Mouse");
}
#endif //Q_WS_QWS
return false;
}
Regards
XiaYi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091028/463df5fb/attachment.html
More information about the Qt-interest-old
mailing list