OK so the editor->setGeometry method has to go in the override method setEditorData of the QItemDelegate.

Does anyone know of an example code where the setItemDelegate is used to paint the thumbnail preview of the images in the QFileDialog?