Maybe my problem is something similar to this problem.
I have a external event (in this case a receive-event from an external device). There is already an application written in MFC which uses CreateEvent and WaitForSingleObject.
I just implemented these functions in my Qt application, but there are 2 problems:
1) I have to do my application for Windows and Linux
2) it seems that WaitForSingleObject sometimes misses events
Should I create a my Class, e.g.
{
...
virtual bool event
(QEvent *e
);
...
}
class MyEvent: public QObject
{
...
QEvent myevent;
virtual bool event(QEvent *e);
...
}
To copy to clipboard, switch view to plain text mode
MyEvent:MyEvent()
{
// somthing doing with QEvent::registerEventType - but what
// using function "setEvent(HANDLE h)" from my API of the evternal event - but how
}
{
emit myEventSignal;
}
MyEvent:MyEvent()
{
// somthing doing with QEvent::registerEventType - but what
// using function "setEvent(HANDLE h)" from my API of the evternal event - but how
}
MyEvent:event(QEvent *e)
{
emit myEventSignal;
}
To copy to clipboard, switch view to plain text mode
But I'm not really sure how to manage this.
This was the only Qt-relevant thread for external events I found:
http://developer.qt.nokia.com/forums/viewthread/1529
Bookmarks