Hello,

In my project, i need to populate a ListView with different item. Those items can have différent nature, and need a custom widget for drawing and editing.

I have build a custom widget (Widget_CarteFille_Gpio) with QDesigner (1 layout, 2 label, 2 combo-box)

Qt Code:
  1. Widget_CarteFille_Gpio::Widget_CarteFille_Gpio (QWidget *parent) :
  2. QWidget (parent)
  3. {
  4. setupUi (this);
  5. }
To copy to clipboard, switch view to plain text mode 

Next, i try to subclass a QItemDelegate who build my new widget for the editing.

Qt Code:
  1. QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
  2. {
  3. Widget_CarteFille_Gpio *editor = new Widget_CarteFille_Gpio (parent);
  4. return editor;
  5. }
To copy to clipboard, switch view to plain text mode 

I build the project, and exec the application !
When I double click on the item my widget is not show !

I read this exemple : http://doc.qtsoftware.com/4.5/itemvi...rdelegate.html but they draw directly on a widget, this is little different of my problem.

If someone have a code exemple about draw a custom widget for viewing/editing in a ListView. I was very interresting.

Thanks
Apologize for my English !