Help with QAbstractNativeEventFilter
-
my code
@bool MyEventFilter::nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pResult)
{
const MSG &msg = *static_cast<MSG *>(pMessage);
switch(msg.wParam)
{
case Qt::Key_0:
qDebug() << "START GAME";
Click(560,580);
break;}
}
@
its call function Click() while i hold key 0 on keyboard, i want catch only keypress for that Click call only ONCE
how to? -
Hi,
Why not use just use QWidget::event ( QEvent * event ) ? Using the native event filter looks like an overkill for your use case.
If I understand you correctly, you want to handle the press of 0 once while holding down a mouse button ?