Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void QueueableDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
- {
- if (option.state & QStyle::State_Selected)
- painter->fillRect(option.rect, option.palette.highlight());
- QWidget *widget = new QPushButton("bonjour");
- widget->render(painter);
- }
- void QueueableDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
- {
- if (option.state & QStyle::State_Selected)
- painter->fillRect(option.rect, option.palette.highlight());
- if (option.state & QStyle::State_Selected)
- painter->setPen(option.palette.highlightedText().color());
- painter->setFont(QFont("Arial", 10));
- painter->drawText(option.rect, Qt::AlignCenter, "Custom drawing");
- }
Add Comment
Please, Sign In to add comment