Hi all
I have to show radio button and check box in a treeview.

to do this I have derived a QAbstractItemModel class that with a custom role that get/set the node check type (radio buttons or check box)
I also derived a QItemDelegate, on this new class in the virtual function:
drawCheck(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, Qt::CheckState state) const
is possible to draw directly the check box or the radio button with QApplication::style()->drawPrimitive using as parameter PE_IndicatorRadioButton or PE_IndicatorViewItemCheck.

my problem is: how can I access the item to draw? I need a ModelIndex to know if draw a radio button or a check box.

Thank all