Ok, for those interested, I have 'solved' my problem by doing the following:
static bool firstTime = true;
if (firstTime) {
QImage::Format_ARGB32_Premultiplied);
frame.
setFrameShape(QFrame::StyledPanel);
frame.render(&image);
borderColor
= QColor(image.
pixel(0,
0));
firstTime = false;
}
static bool firstTime = true;
static QColor borderColor = QColor();
if (firstTime) {
QFrame frame;
QImage image = QImage(widget->size(),
QImage::Format_ARGB32_Premultiplied);
frame.setFrameShape(QFrame::StyledPanel);
frame.render(&image);
borderColor = QColor(image.pixel(0, 0));
firstTime = false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks