I'm having a problem with pyside2. I need to implement a color picker that, when I choose a color, visualize that color in a little square.
I've done the color picker like this:
color = QtWidgets.QColorDialog.getColor()
but I don't know how to make a square (it should be a label?) and to colour it with the selected color.
If you can use a
QLabel
, to change the background colorQPalette
is used:Or use Qt Style Sheet: