I was successful with the following approach:
QImage glyph
(QImage::fromData(pBuffer, glyph_bin_string.
size(),
"PNG" ));
if(!glyph.isNull())
{
static const QSize hint
(100,
100);
description_icon.actualSize(hint);
item2->setSizeHint(hint);
item2->setIcon(description_icon);
}
QStandardItem item2 = new QStandardItem(...);
QImage glyph(QImage::fromData(pBuffer, glyph_bin_string.size(), "PNG" ));
if(!glyph.isNull())
{
QIcon description_icon(QPixmap::fromImage(glyph));
static const QSize hint(100, 100);
description_icon.actualSize(hint);
item2->setSizeHint(hint);
item2->setIcon(description_icon);
}
To copy to clipboard, switch view to plain text mode
Now, I have one small problem: My QIcon is highlighted when active/selected; It has a blue hue. I would prefer it if it didn't have any blue hue while highlighted/select.
Is that possible?
Regards,
Sternocera
Bookmarks