szieke / ScriptCommunicator_serial-terminal

Scriptable cross-platform data terminal which supports: serial port, UDP, TCP, SPI, I2C and CAN.
https://sourceforge.net/projects/scriptcommunicator/
717 stars 187 forks source link

Sets the background color of a gui element QCheckBox #16

Closed hanusan closed 7 years ago

hanusan commented 7 years ago

QCheckBox.setBackgroundColor( String color)

I think it does not work right, from my point of view it did not work.

szieke commented 7 years ago

Hi,

that's a problem in Qt. With some GUI elements (like QCheckbox) this doesn't work (they ignore the palette color for the background). I have search and tried several things for hours now. But I could not change the background color dynamically (if I set the Button role (in QtDesigner) to e.g. green and autoFillBackground to true then the background color is green (but I cannot change it dynamically from my code).

hanusan commented 7 years ago

Hello,

thank you for the explanation.