qt 控件样式

ui.lineEdit->setStyleSheet("QLineEdit{background: rgb(255,255,255,255);border-radius: 8px;border: 2px solid gray;}"
                                    "QLineEdit:hover{border: 3px solid gray;}"
                                    "QLineEdit:focus { border-width:2px; border-color:rgb(170, 170, 255); } ");
    ui.lineEdit_2->setStyleSheet("QLineEdit{background: white;border-radius: 8px;border: 2px solid gray;}"
                                    "QLineEdit:hover{border: 3px solid gray;}"
                                    "QLineEdit:focus { border-width:2px; border-color:rgb(170, 170, 255); } ");
    ui.pushButton->setStyleSheet("QPushButton{background: rgb(255,255,255,20);border: 2px solid gray;border-radius: 10px;}"
                                 "QPushButton:hover{background: rgb(255,255,255,120);}"
                                 "QPushButton:pressed{background: rgb(255,255,255,255);border-color:rgb(170, 170, 255);}");
    

 

posted @ 2022-05-27 14:35  雾枫  阅读(55)  评论(0)    收藏  举报