If Qt insists you are not in the GUI thread then you probably are not in the GUI thread You can post an event to an object in the gui thread to do the task for you.