Simplest way for PyQT Threading
<p>I have a GUI in PyQt with a function <code>addImage(image_path)</code>. Easy to imagine, it is called when a new image should be added into a QListWidget. For the detection of new images in a folder, I use a <code>threading.Thread</code> with <code>watchdog</code> to detect file changes in the folder, and this thread then calls <code>addImage</code> directly.</p>

<p>This yields the warning that <code>QPixmap</code> shouldn't be called outside the gui thread, for reasons of thread safety.</p>

<p>What is the best and most simple way to make this threadsafe? QThread? Signal / Slot? QMetaObject.invokeMethod? I only need to pass a string from the thread to <code>addImage</code>.</p>