[SOLVED] Can I return NULL in QItemDelegate::createEditor(...) ?
In the following method for the following class:
@QWidget * QItemDelegate::createEditor ( QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const [virtual]
Just curious to know if it's a safe thing to do.
Why don't you just DON'T return Qt::ItemIsEditable from the model's flags() implementation?
well because I am using a QTableWidget but I ended up calling:
You can safely return a null pointer (NULL or 0). Qt handles that case and your application will not crash.