pyqt5 给按钮设置图标和css样式
设置图标self.pushButton.setIcon(QIcon("sure.png"))设置css样式self.pushButton.setStyleSheet("QPushButton{color:black}""QPushButton:hover{color:red}"...
·
设置图标
self.pushButton.setIcon(QIcon("sure.png"))
设置css样式
self.pushButton.setStyleSheet("QPushButton{color:black}"
"QPushButton:hover{color:red}"
"QPushButton{background-color:lightgreen}"
"QPushButton{border:2px}"
"QPushButton{border-radius:10px}"
"QPushButton{padding:2px 4px}")更多推荐


所有评论(0)