有人知道为什么在QT5中不管是用代码写自定义的样式还是直接在ui界面中设计,执行后多没有效果

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
QString listWidgetStyle = "QProgressBar:vertical"
                          "{"
                          "width:8px;"
                          "background-color:transparent;"
                          "margin:0px,0px,0px,0px;"
                          " padding-top:12px;   /*上预留位置*/"
                          " padding-bottom:12px;    /*下预留位置*/"
                          "}"


                          "QProgressBar::handle:vertical"
                          " {"
                          "     width:8px;"
                          "     background-color:rgba(255,255,255,0.2);"
                          "     border-radius:4px;"
                          "     min-height:20px;"
                          " }"


                          "QProgressBar::handle:vertical:hover"
                          "{"
                          "    width:9px;"
                          "    background-color:rgba(255,255,255,0.5);"
                          "    border-radius:4px;"
                          "    min-height:20;"
                          "}"

                          "QProgressBar::add-line:vertical"
                          "{"
                          "     height:12px;"
                          "     width:10px;"
                          "     border-image:url(:/selectfile/scroll/3.png);"
                          "     subcontrol-position:bottom;"
                          "}"

                          "QProgressBar::sub-line:vertical"
                          "{"
                           "     height:12px;"
                           "     width:10px;"
                          "     border-image:url(:/selectfile/scroll/1.png);"
                          "     subcontrol-position:top;"
                          "}"
                         "QProgressBar::add-line:vertical:hover"
                          "{"
                           "     height:12px;"
                           "     width:10px;"
                           "     border-image:url(:/selectfile/scroll/4.png);"
                           "     subcontrol-position:bottom;"
                           " }"


                           " QProgressBar::sub-line:vertical:hover"
                           " {"
                           "     height:12px;"
                           "     width:10px;"
                           "     border-image:url(:/selectfile/scroll/2.png);"
                          "     subcontrol-position:top;"
                           " }"

                           " QProgressBar::add-page:vertical,"
                           "QProgressBar::sub-page:vertical"
                           " {"
                           "     background-color:transparent;"
                           "     border-radius:4px;"
                           "}";

ui->progressBar->setStyleSheet(listWidgetStyle);
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果

https://www.cnblogs.com/woshizhizhong-tech/p/15231465.html
这个答案挺不错。

我最近也在苦恼同样的问题,https://ask.csdn.net/questions/7628314

你直接在设计界面中添加样式表也不行嘛