How can I replace a custom delegate with the default delegate.
-
I'm successfully using QTableView::setItemDelegateForColumn to use a QDateTimeEdit widget to display and edit SQLite INTEGERs etc as dates and times.
However I also need the ability to replace my custom delegate with the default delegate. However I can't see any obvious way of doing this: QAbstractItemDelegate::deleteLater() is the nearest method I could find.
-
I've created a context menu for the table header, so that for each column the user can choose to display and edit the content as a date, as a time, both, or natively. This is necessary because it's not possible from a general SQLite database to know how the data should be represented.
The user should be able to open a view on a table, choose a delegate for a column, make some changes to the column, change the delegate, make some more changes. They should be able to submit the changes at any point.
I can change delegates, but what I can't see how to do is revert to the default delegate so that the user can edit the "raw" or native data.
-
-
It's "QTBUG-16457":http://bugreports.qt.nokia.com/browse/QTBUG-16457