@jsulm Thanks for replying
Its on the main thread, called by the variable in current_queue_item var in update_progress_to_specific_queue_num() function. But the update_progress_to_specific_queue_num() is called by the signal that is emitted by the worker thread. Which is safe.
UPDATE: I solved this problem by changing the data variable in the queue_worker.addWork() function.
from:
data = [f'{args["name"]} - {args["frame_name"]} - {args["size_str"]}', args]
to:
data = [f'{args["name"]} - {args["frame_name"]} - {args["size_str"]}', args["queue_num"]]
I now only sent the queue_num's value, not the whole args dict. It was a dumb idea to send the whole args dict, when some of the information is not even used. Also changed a couple of code in Queue.add_to_list() item_widget var
from
item_widget = QueueItemWidget(item_data[0], item_data[1]["queue_num"])
to
item_widget = QueueItemWidget(item_data[0], item_data[1])
and lastly in the function Queue.find_item_by_value()
from
if list_item.data(Qt.UserRole)["queue_num"] == value:
return list_item
to
if list_item.data(Qt.UserRole) == value:
return list_item
But I still don't know why using the whole args dict threw an error.