Hello,
I've a QStyledItemDelegate derived class for a custom delegate editor:

Qt Code:
  1. CheckBoxDelegate::CheckBoxDelegate(const QStringList &texts, QObject *parent)
  2. : QStyledItemDelegate(parent), texts(texts)
  3. { }
  4.  
  5. QWidget *CheckBoxDelegate::createEditor(QWidget *parent,
  6. const QStyleOptionViewItem &/* option */,
  7. const QModelIndex &index) const
  8. {
  9. CheckBoxDelegateWidget *editor = new CheckBoxDelegateWidget(texts, parent);
  10. ...
  11. return editor;
  12. }
To copy to clipboard, switch view to plain text mode 
Now I want sizeHint() to return the CheckBoxDelegateWidget sizes, like this:
Qt Code:
  1. QSize CheckBoxDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index ) const
  2. {
  3. return editor->sizeHint(); // what editor?
  4. }
To copy to clipboard, switch view to plain text mode 
Where I can obtain the editor pointer? Why createEditor() doesn't let me do a local copy of the pointer?
Thank you.