chatgpt生成的一些qt进度条样式

样式

//绿色小方块
style = "QProgressBar {"
                               "border: 1px solid #bbb;"
                               "border-radius: 5px;"
                               "text-align: center;"
                               "background-color: #eee;"
                           "}"
                           "QProgressBar::chunk {"
                               "background-color: #669966;"//这是方块颜色,#FFC1C1为粉色
                               "width: 10px;"
                               "margin: 0.5px;"
                               "border-radius: 3px;"
                           "}";
//变态
         style = "QProgressBar {"
                             "border: 1px solid #00ff00;"
                             "background-color: #000000;"
                             "color: #00ff00;"
                         "}"
                         "QProgressBar::chunk {"
                             "background-color: #ff0000;"
                             "border-radius: 3px;"
                             "width: 10px;"
                         "}"
                         "QProgressBar::subcontrol:horizontal {"
                             "height: 1px;"
                             "border-width: 1px;"
                             "border-style: solid;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:disabled {"
                             "border-color: #8f8f8f;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:enabled {"
                             "border-color: #8f8f8f;"
                         "}"
                         "QProgressBar::subcontrol:vertical {"
                             "width: 12px;"
                             "border-width: 1px;"
                             "border-style: solid;"
                         "}"
                         "QProgressBar::chunk:horizontal {"
                             "border: none;"
                         "}"
                         "QProgressBar::chunk:vertical {"
                             "border: none;"
                         "}";

         //极简
          style = "QProgressBar {"
                             "border: none;"
                             "background-color: #ffffff;"
                         "}"
                         "QProgressBar::chunk {"
                             "background-color: #000000;"
                         "}"
                         "QProgressBar::subcontrol:horizontal {"
                             "height: 5px;"
                             "margin: 0px;"
                             "padding: 0px;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:disabled {"
                             "background-color: #f0f0f0;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:enabled {"
                             "background-color: #f0f0f0;"
                         "}"
                         "QProgressBar::subcontrol:vertical {"
                             "width: 5px;"
                             "margin: 0px;"
                             "padding: 0px;"
                         "}"
                         "QProgressBar::chunk:horizontal {"
                             "border-radius: 0px;"
                         "}"
                         "QProgressBar::chunk:vertical {"
                             "border-radius: 0px;"
                         "}";
          //浏览器
          style = "QProgressBar {"
                              "border: 1px solid #c4c4c4;"
                              "background-color: #ffffff;"
                              "color: #000000;"
                              "text-align: center;"
                          "}"
                          "QProgressBar::chunk {"
                              "background-color: #00b8ff;"
                              "border-radius: 3px;"
                              "width: 10px;"
                          "}"
                          "QProgressBar::subcontrol:horizontal {"
                              "height: 12px;"
                              "border-width: 1px;"
                              "border-style: solid;"
                          "}"
                          "QProgressBar::subcontrol:horizontal:disabled {"
                              "border-color: #8f8f8f;"
                          "}"
                          "QProgressBar::subcontrol:horizontal:enabled {"
                              "border-color: #8f8f8f;"
                          "}"
                          "QProgressBar::subcontrol:vertical {"
                              "width: 12px;"
                              "border-width: 1px;"
                              "border-style: solid;"
                          "}"
                          "QProgressBar::chunk:horizontal {"
                              "border: none;"
                          "}"
                          "QProgressBar::chunk:vertical {"
                              "border: none;"
                          "}";
          //绿黑
        style = "QProgressBar {"
                              "border: 1px solid #00ff00;"
                              "background-color: #000000;"
                              "color: #00ff00;"
                          "}"
                          "QProgressBar::chunk {"
                              "background-color: #00ff00;"
                              "border-radius: 5px;"
                              "width: 50px;"
                          "}"
                          "QProgressBar::subcontrol:horizontal {"
                              "height: 12px;"
                              "border-width: 1px;"
                              "border-style: solid;"
                          "}"
                          "QProgressBar::subcontrol:horizontal:disabled {"
                              "border-color: #8f8f8f;"
                          "}"
                          "QProgressBar::subcontrol:horizontal:enabled {"
                              "border-color: #8f8f8f;"
                          "}"
                          "QProgressBar::subcontrol:vertical {"
                              "width: 12px;"
                              "border-width: 1px;"
                              "border-style: solid;"
                          "}"
                          "QProgressBar::chunk:horizontal {"
                              "border: none;"
                          "}"
                          "QProgressBar::chunk:vertical {"
                              "border: none;"
                          "}";
        //绿黑
        style = "QProgressBar {"
                           "border: 1px solid #8f8f8f;"
                           "background-color: #000000;"
                           "color: #00ff00;"
                       "}"
                       "QProgressBar::chunk {"
                           "background-color: #00ff00;"
                           "border-radius: 5px;"
                           "width: 50px;"
                       "}"
                       "QProgressBar::subcontrol:horizontal {"
                           "height: 12px;"
                           "border-width: 1px;"
                           "border-style: solid;"
                       "}"
                       "QProgressBar::subcontrol:horizontal:disabled {"
                           "border-color: #8f8f8f;"
                       "}"
                       "QProgressBar::subcontrol:horizontal:enabled {"
                           "border-color: #8f8f8f;"
                       "}"
                       "QProgressBar::subcontrol:vertical {"
                           "width: 12px;"
                           "border-width: 1px;"
                           "border-style: solid;"
                       "}"
                       "QProgressBar::chunk:horizontal {"
                           "border: none;"
                       "}"
                       "QProgressBar::chunk:vertical {"
                           "border: none;"
                       "}";

       //橙黄
        style = "QProgressBar {"
                            "border: 1px solid #FFB900;"
                            "border-radius: 5px;"
                            "background-color: #FDDED4;"
                        "}"
                        "QProgressBar::chunk {"
                            "background-color: #FFB900;"
                            "border-radius: 5px;"
                        "}"
                        "QProgressBar::subcontrol:indicator {"
                            "image: url(:/sunset_rider.png);"
                            "width: 30px;"
                            "height: 30px;"
                            "subcontrol-origin: margin;"
                            "subcontrol-position: left;"
                            "border-radius: 5px;"
                        "}";

           //紫色
        style = "QProgressBar {"
                            "border: 1px solid #9c27b0;"
                            "border-radius: 10px;"
                            "background-color: #f3e5f5;"
                        "}"
                        "QProgressBar::chunk {"
                            "background-color: #9c27b0;"
                            "border-radius: 10px;"
                        "}";
        //蓝白色
        style = "QProgressBar {"
                           "border: 1px solid #8f8f8f;"
                           "border-radius: 5px;"
                           "background-color: #e6e6e6;"
                       "}"
                       "QProgressBar::chunk {"
                           "background-color: #3d85c6;"
                           "border-radius: 5px;"
                           "width: 50px;"
                       "}"
                       "QProgressBar::subcontrol:horizontal {"
                           "height: 12px;"
                           "border-width: 2px;"
                           "border-style: solid;"
                       "}"
                       "QProgressBar::subcontrol:horizontal:disabled {"
                           "border-color: #8f8f8f;"
                       "}"
                       "QProgressBar::subcontrol:horizontal:enabled {"
                           "border-color: #8f8f8f;"
                       "}"
                       "QProgressBar::subcontrol:vertical {"
                           "width: 12px;"
                           "border-width: 2px;"
                           "border-style: solid;"
                       "}"
                       "QProgressBar::chunk:horizontal {"
                           "border: none;"
                       "}"
                       "QProgressBar::chunk:vertical {"
                           "border: none;"
                       "}";
        //灰色
        style = "QProgressBar {"
                            "border: 1px solid #c4c4c4;"
                            "background-color: #f0f0f0;"
                            "text-align: center;"
                        "}"
                        "QProgressBar::chunk {"
                            "background-color: #666666;"
                        "}"
                        "QProgressBar::subcontrol:horizontal {"
                            "height: 12px;"
                            "border-width: 1px;"
                            "border-style: solid;"
                        "}"
                        "QProgressBar::subcontrol:horizontal:disabled {"
                            "border-color: #8f8f8f;"
                        "}"
                        "QProgressBar::subcontrol:horizontal:enabled {"
                            "border-color: #8f8f8f;"
                        "}"
                        "QProgressBar::subcontrol:vertical {"
                            "width: 12px;"
                            "border-width: 1px;"
                            "border-style: solid;"
                        "}"
                        "QProgressBar::chunk:horizontal {"
                            "border: none;"
                        "}"
                        "QProgressBar::chunk:vertical {"
                            "border: none;"
                        "}";


        //橙色+紫色
         style = "QProgressBar {"
                            "border: 2px solid #774AFF;"
                            "background-color: #EDEBFF;"
                            "color: #774AFF;"
                            "text-align: center;"
                        "}"
                        "QProgressBar::chunk {"
                            "background-color: #F97B6A;"
                            "border-radius: 3px;"
                            "width: 10px;"
                        "}"
                        "QProgressBar::subcontrol:horizontal {"
                            "height: 12px;"
                            "border-width: 1px;"
                            "border-style: solid;"
                        "}"
                        "QProgressBar::subcontrol:horizontal:disabled {"
                            "border-color: #8f8f8f;"
                        "}"
                        "QProgressBar::subcontrol:horizontal:enabled {"
                            "border-color: #8f8f8f;"
                        "}"
                        "QProgressBar::subcontrol:vertical {"
                            "width: 12px;"
                            "border-width: 1px;"
                            "border-style: solid;"
                        "}"
                        "QProgressBar::chunk:horizontal {"
                            "border: none;"
                        "}"
                        "QProgressBar::chunk:vertical {"
                            "border: none;"
                        "}";

         //蓝色
         style = "QProgressBar {"
                             "border: 1px solid #c4c4c4;"
                             "background-color: #f0f0f0;"
                             "text-align: center;"
                         "}"
                         "QProgressBar::chunk {"
                             "background-color: #00b8ff;"
                         "}"
                         "QProgressBar::subcontrol:horizontal {"
                             "height: 12px;"
                             "border-width: 1px;"
                             "border-style: solid;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:disabled {"
                             "border-color: #8f8f8f;"
                         "}"
                         "QProgressBar::subcontrol:horizontal:enabled {"
                             "border-color: #8f8f8f;"
                         "}"
                         "QProgressBar::subcontrol:vertical {"
                             "width: 12px;"
                             "border-width: 1px;"
                             "border-style: solid;"
                         "}"
                         "QProgressBar::chunk:horizontal {"
                             "border: none;"
                         "}"
                         "QProgressBar::chunk:vertical {"
                             "border: none;"
                         "}";
                         //蓝色小方格
style = "QProgressBar {"
                             "border: 2px solid #c8c8c8;"
                             "border-radius: 5px;"
                             "background-color: #f2f2f2;"
                         "}"
                         "QProgressBar::chunk {"
                             "background-color: #0078d7;"
                             "width: 10px;"
                             "margin: 0.5px;"
                             "border-radius: 3px;"
                         "}";

使用方式

progressbar->setStyleSheet(style);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wow_awsl_qwq

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值