Do not modify the GUI from another thread. This must be done only by the GUI thread.
Instead of what you do, notify the GUI thread( via signals ) and let it update the widgets.