progressBar->setStyleSheet
(
"QProgressBar
{
min-width: 280px; //最小宽度
max-width: 280px; //最大宽度
max-height:15px; //最大高度
background-color:white; //背景色
border:1px solid #55585E;//边框样式
border-radius:5px; //边框圆角设置
} "
"QProgressBar::chunk
{
min-width: 280px;
max-width: 280px;
max-height:17px;
background-color:blue;
border-top-left-radius:5px;
border-top-right-radius:0px;
border-bottom-right-radius:0px;
border-bottom-left-radius:5px;
} "
);
设置进度条文字是否可见
progressBar->setTextVisible(false);
标签:5px,280px,max,QProgressBar,width,radius,样式表,设置,border
From: https://blog.csdn.net/weixin_47236438/article/details/143587367