Qt5 - setting background color to QPushButton and QCheckBox

后端 未结 6 680
小蘑菇
小蘑菇 2020-12-06 05:01

I\'m trying to change the background color of a QAbstractButton (either a QPushButton or QCheckBox) in Qt5 and having zero luck.

This does nothing:

p         


        
6条回答
  •  执笔经年
    2020-12-06 05:18

    Add propoerty border:none; to the stylesheet

    For some reason this removes the default background color also.

    Example: background-color: rgba(46, 204, 113, 0.4); border: none;

提交回复
热议问题