I need to show some widgets from the second thread. These codes do not exist in a subclass of QObject, so I cannot use signal and slot to accomplish it. I was thinking about using events but I didn't see any suitable event. I've also tried to use QMetaObject::invokeMethod() but it didn't work either. It returns true but nothing happens.

Could anyone give me some suggestions?
Thanks!