第一种是按键上面的字颜色的改变:

 1 ui->motor1->setStyleSheet("color: red"); 
效果:

QT按键(Qbutton)改变颜色

第二种是背景改变:

 1 ui->motor1->setStyleSheet("background-color: rgb(175,238,238)"); 

  效果:

                           QT按键(Qbutton)改变颜色

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-19
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2022-02-28
相关资源
相似解决方案