Get color by clicking PyQt5

0

Hello basically I want to know how to get the color of some element by clicking on it.

Now try invoking PyQt Color Picker widget:

def color_picker(self):
    color = QtGui.QColorDialog.getColor()
    self.styleChoice.setStyleSheet("QWidget { background-color: %s}" % color.name())

but I want to get the color of any point where I click.

    
asked by Angel Judath Alvarez 08.03.2018 в 06:08
source

0 answers