pythonqt-designerlcd

Change color of LCD digits in Qt Designer


I'm writing a simple Python GUI with QtD. I cannot find out (if possible) how I can change the color of the LCD digits. They are same color as the background and very difficult to see. Any help appreciated.

Thanks.


Solution

  • Setting a stylesheet seems to work fine for me. In QDesigner, right-click the lcd widget (or better yet, the top widget), click 'Change stylesheet' and paste in the following text:

    QLCDNumber{
        color: rgb(255, 89, 242);    
        background-color: rgb(0, 85, 0);
    }
    

    When you press OK, you should have an QLCDNumber with pink digits on a green background

    I just picked some colors at random, don't judge me on the horrible combination! ;)