If you want to use your existing function in new thread, it will not work as it is, because this function modifies GUI objects (QLabel in you case), as you earlier said.
One important thing to remember when creating new thread in Qt, is never access the GUI objects from new thread, GUI objects should always be in main GUI thread.
So, you need to modify your external function, and separate GUI and logic part of it, then put the logic part of it in the new thread, and put the GUI part of it in the main GUI thread. Then the last thing is to connect you logic to your GUI, that should be straight forward it know how to use signals and slots.
Check this example ThreadTest.zip
Bookmarks