Qt中使用Qss修改边框宽度,字体颜色,修改选择时背景色和字体颜色

以Dialog为例
setStyleSheet("QDialog {border: 1px solid #CCCCCC;}");
以LineEdit为例
setStyleSheet("color:white");
以日历为例
setStyleSheet(
                            "QCalendarWidget QTableView  "
                            "{ "
                            "alternate-background-color:rgb(184, 184, 184);"
                            "background-color:rgb(184, 184, 184);"
                            "} "
                            " QCalendarWidget QAbstractItemView:enabled  "
                            "{ "
                               " selection-color:black;"
                            "  selection-background-color: white;  "
                             "};"
                        );

猜你喜欢

转载自blog.csdn.net/qq_39742146/article/details/84242105