MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
setWindowState(Qt::WindowMaximized); // 最大化
setStyleSheet(
"QMainWindow{"
"background:white;}"
"QToolButton{"
"background-color:rgba(100,225,100,30);"//背景色
"border-style:outset;" //边框样式
"border-width:4px;" //边框宽度像素
"border-radius:10px;" //边框圆角半径像素
"border-color:rgba(255,255,255,30);" //边框颜色
"font:bold 15px;" //字体,字体大小
"color:rgba(0,0,0,100);" //字体颜色
"padding:6px;" //填衬
"}"
"QToolButton:hover{"
"background-color:rgba(100,255,100,100);"
"border:0px;"
"border-color:rgba(255,255,255,200);"
"color:rgba(0,0,0,200);"
"}"
"QToolButton:pressed{"
"background-color:rgba(100,255,100,200);"
"border:0px;"
"border-color:rgba(255,255,255,30);"
"border-style:inset;"
"color:rgba(0,0,0,100);"
"}");
}
网友评论