No, you can't have a return value for a signal./ This is mainly because you don't actually implement the signals. You just declare them. The "implementation" is done by moc.
Create a small class or struct that has a few members(public, nothing fancy).Qt Code:
because I want this QTreeWidgetItem pointer to be added in the list which is in threadTo copy to clipboard, switch view to plain text mode
You emit the signal with this an instance of this class as parameter. In the worker thread, before you emit, populate the class with the needed data( the tree item, and whatever you may need in the GUI thread, when you receive the signal ).
Be careful that when emitting signals with custom types, these types have to be registered with Qt.
See qRegisterMetaType.
Regards
Bookmarks