I have used this code and seems that works fine: Qt Code: Switch view QPixmap qPix = QPixmap::grabWidget(ui->myWidget); QImage image(qPix.toImage()); QColor color(image.pixel(0, 1)); QPixmap qPix = QPixmap::grabWidget(ui->myWidget); QImage image(qPix.toImage()); QColor color(image.pixel(0, 1)); To copy to clipboard, switch view to plain text mode Thanks!
QPixmap qPix = QPixmap::grabWidget(ui->myWidget); QImage image(qPix.toImage()); QColor color(image.pixel(0, 1));
Forum Rules
Bookmarks