qt代码设置样式

RedWetPlace / 2023-06-02 / 原文

ui->btn2->setStyleSheet("QPushButton{\ background:#EE6AA7;\ border:1px solid #8B7E66;\ border-radius:5px;\ color:white;\ }\ QPushButton:hover{\ background:#FF6EB4;\ }\ QPushButton:hover:pressed{\ background:#CD6090; \ }");