Does anybody know how to determie if current thread is the UI thread in Qt3?
Googled for the question, no luck so far ....
Thanks in advance.
Does anybody know how to determie if current thread is the UI thread in Qt3?
Googled for the question, no luck so far ....
Thanks in advance.
Just an info; I'm not sure if this would help - as far as I know the Ui thread is the main thread, the one called from main(). If you can implement comparision of the main thread and the thread you are testing, then it's a way to check.
You could add a static method to your main GUI class and return the current thread from from there. The current thread should be stored as a static member:
Qt Code:
... { return mGuiThread; }To copy to clipboard, switch view to plain text mode
Then you could access it in other parts of the program and compare it with QThread::currentThread.
Bookmarks