how to activate qt event loop on linux

62 Views Asked by At

Is there any way to force the program build on top of qt5 to get into it's QEventDispatcherGlib::processEvent()? Currently I am porting a program from windows to linux and repair its auto-test module, and in windows, there is so many native MSGs to drive the program come into it's NativeEventFilter where the commands read from file will be executed(of course there are other places where the commands will be executed, but that's an important invoke point during auto-test). However in linux, the program just blocked when executing test files because there is no messages or event to awake the poll() call in QEventDispatcherGlib::processEvent(), which will lead to failure during command consumption. I want know if there is some mechanism so that I can wake up the poll() and get into my NativeEventFilters. (simulate key/mouse press event may lead to mistakes, so do not take into consideration).

maybe send some null msg/event via xcb by another thread? if so, example code is highly appreciated. looking forward to your replies, my friends.

0

There are 0 best solutions below