
Originally Posted by
alitoh
. . . I'm barely keeping up with delegates, to be honest.
Looks to me like you are handling delegates pretty well 
Take a look at QVariant::value() in the docs. As long as the color name in your cell is recognized by Qt that statement will work. To see the list of Qt recognized color names use:
qDebug
() <<
QColor::colorNames();
qDebug() << QColor::colorNames();
To copy to clipboard, switch view to plain text mode
My Debian system lists 148 colors.
Regarding the text, use:
painter->drawText(option.rect.x() + 27, option.rect.y() + 20, index.data().toString());
painter->drawText(option.rect.x() + 27, option.rect.y() + 20, index.data().toString());
To copy to clipboard, switch view to plain text mode
Bookmarks