Testing foreground, background, etc. colors of Qt widgets (Qt)

Last edited on

The following example shows how to use the Qt API in Squish test scripts to test colors of Qt widgets:

def main():
    # ...

    check_box = waitForObject(":My QCheckBox")
    c = check_box.palette.color(check_box.backgroundRole())
    test.compare("#f0f0f0", c.name)

    # ...
test.py