QPoint pos = m_view->mapFromGlobal(QCursor::pos());QImage im = QPixmap::grabWidget(qApp->desktop()->winId(),pos.x(),pos.y(),1,1).toImage();if (im.isNull()) return 0;QRgb color = im.pixel(0,0);