Thanks again.

I'm still not quite there though. My createEditor() looks like:
Qt Code:
  1. QWidget * DateDelegate::createEditor(QWidget *parent,
  2. const QStyleOptionViewItem &option,
  3. const QModelIndex &index) const
  4. {
  5. if (index.data().canConvert(QVariant::Date)) {
  6. QDateEdit *editor = new QDateEdit(parent);
  7. editor->setDisplayFormat("dd MMM yyyy");
  8.  
  9. // Capture the size hint for later
  10. DateDelegate *obj = const_cast<DateDelegate *>(this);
  11. QSize size = editor->sizeHint();
  12. QMetaObject::invokeMethod(obj, "captureSizeHint", Qt::QueuedConnection,
  13. Q_ARG(QModelIndex, index),
  14. Q_ARG(QSize, size) );
  15.  
  16. connect(editor, SIGNAL(editingFinished()),
  17. this, SLOT(commitAndCloseEditor()));
  18. return editor;
  19. }
  20. else
  21. return QStyledItemDelegate::createEditor(parent, option, index);
  22. }
To copy to clipboard, switch view to plain text mode 
and the custome slot captureSizeHint():
Qt Code:
  1. void DateDelegate::captureSizeHint(const QModelIndex & index, QSize hint)
  2. {
  3. m_size = hint;
  4. emit sizeHintChanged(index);
  5. }
To copy to clipboard, switch view to plain text mode 
The sizeHint() returns m_size if it is valid otherwise it just hands off to the default implementation.

The code works but the column does not resize until the editor is closed. Tracing the execution I see the editor size hint being captured at creation time, but the delegate's sizeHint() method is not called again until after the editor closes. Using Qt::DirectConnection makes no difference.

Forgive me if I'm missing the blindingly obvious but I am in the middle of a steep C++ and Qt learning curve.