Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.0 Beta1
-
None
-
Tested in Windows 7 and Windows XP
-
38a3158d2fe32dc55c6b6286fac58f782571294a
Description
The "Pick Screen Color" button in QColorDialog permits scanning the colors of the entire screen to pick one of them. In Linux it works OK, but in Windows it only scans the area of the dialog itself and therefore it becomes rather useless.
Clarification: Picking a color outside the dialog works, but the color is not updated while moving the cursor on Windows.
I'm the author of that button, but I don't have any Windows development machine to make the changes and test them.
The error probably lies in this method:
QColor QColorDialogPrivate::grabScreenColor(const QPoint &p)
{
const QDesktopWidget *desktop = QApplication::desktop();
const QPixmap pixmap = QGuiApplication::screens().at(desktop->screenNumber())>grabWindow(desktop>winId(),
p.x(), p.y(), 1, 1);
QImage i = pixmap.toImage();
return i.pixel(0, 0);
}
Attachments
Issue Links
- relates to
-
QTBUG-14332 QColorDialog doesn't have a tool to pick a color from the screen
-
- Closed
-
-
QTBUG-34663 BC break in QColorDialog
-
- Closed
-