Hi all,

I wrote a custom itemdelegate for my treeview.
Editing works fine but I need to have a QTableWidget display the content
while the item is not edited.

My guess was to reimplement the paint function like this with just one
fiexed item for the test:

 void RelationsDelegate::paint(QPainter *painter, const
QStyleOptionViewItem &option, const QModelIndex &index) const
 {
         QTableWidget widget(3,3);
         widget.setRowCount(3);
         widget.setColumnCount(3);
         widget.setGeometry(option.rect);

         QTableWidgetItem *item1 = new QTableWidgetItem("test1");
         widget.setItem(0,0,item1);

         painter->save();
        widget.render(painter);
        painter->restore();
 }


All I get is a white field in the regarding field of the treeview. All
other items are shown as expected.

What do I miss?

Cheers

Eckhard
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to