Don't double post, please.
QPixmap::grabWidget() has been deprecated and is no longer in Qt5, so this code wouldn't compile even in C++. However, there is an alternative. I am not too familiar with PyQt5, but the code should look something like this (where "widget" the is one you want the pixels from):
pixMap
= QPixmap( widget.
width(), widget.
height() )widget.render( pixMap )
image = pixMap.toImage()
color = image.pixelColor( 0, 0 )
pixMap = QPixmap( widget.width(), widget.height() )
widget.render( pixMap )
image = pixMap.toImage()
color = image.pixelColor( 0, 0 )
To copy to clipboard, switch view to plain text mode
Bookmarks