C++ (Qt)painter->drawText(option.rect, Qt::TextWordWrap, index.data().toString());
C++ (Qt)void QWidget::render ( QPainter * painter, const QPoint & targetOffset = QPoint(), const QRegion & sourceRegion = QRegion(), RenderFlags renderFlags = RenderFlags( DrawWindowBackground | DrawChildren )
C++ (Qt)while(!asleep()) sheep++;
C++ (Qt)void MyDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const{ QStyleOptionViewItem opt = option; initStyleOption(&opt, index); ... const QWidget *widget = opt.widget; QStyle *style = widget ? widget->style() : QApplication::style(); style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, widget); .... (custom draw)}