Is there a way of doing this without using a QItemDelegate? I've been having a lot of trouble with it. For example, if I use a Delegate:
- Won't have a native dialog.
- I'll have to implement my own image preview,
For some reason I can't resize the window cause setGeometry doesn't work, etc etc.
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const { Q_UNUSED(option); Q_UNUSED(index); QFileDialog* editor = new QFileDialog(parent); editor->setFilter("*.png"); editor->setDirectory(mResources); editor->setGeometry(0,0,1000,500); editor->exec() // <--- big file dialog; return editor; // <--- tiny file dialog; };