OK let me explain what cxl2253 is trying to do?
Assume that you have a C library.
In the library's documentation you have a callback function about the progress of some event. So when this callback is called then cxl2253 want to emit a signal for passing info to related object.
Ok, let's make it clear.
Assume that you want to wrap a class to convert C library to C++ object. As used library's docs says you need to use a callback func, but callbacks are not encouraged in C++ so what else to do?
Then use a static class member. In this case static funcs cannot contain class wide variables.
But off course there are tricks to make them available.
But there is two things to take care of before using these tricks:
1. If you're using the callbacks within QThread, don't do any GUI thread operations. Do with
whatever you do.
2. If you use emit within the QThread emit is syncronious, this means you're directly reaching the GUI thread so this is undefined behaviour also.
As a result you had better forget emit in static class functions if It's used in QThread.
Bookmarks