Hey folks,

I'm trying to display my own widget in a QListView using a QItemDelegate.

When specifying a simple widget, the delegate seems to work pretty good.
Unfortunately when I specify a more complete one, it doesn't seem to display anything.
The view is left blank, plus no resizing of the list row.

Qt Code:
  1. QWidget * ZeContactDelegate::createEditor(QWidget *parent,
  2. const QStyleOptionViewItem &option,
  3. const QModelIndex &index) const
  4. {
  5. QWidget * test = new QWidget(parent);
  6.  
  7. QVBoxLayout * layout = new QVBoxLayout(test);
  8.  
  9. QPushButton * editor = new QPushButton;
  10. QPushButton * editor2 = new QPushButton;
  11. QPushButton * editor3 = new QPushButton;
  12.  
  13. layout->addWidget(editor);
  14. layout->addWidget(editor2);
  15. layout->addWidget(editor3);
  16.  
  17. test->resize(333, 333);
  18. test->show();
  19.  
  20. return test;
  21. }
To copy to clipboard, switch view to plain text mode 

Any thoughts ?