如果widget是子窗口首先要添加一句:

 this->setAttribute(Qt::WA_StyledBackground,true);
this->setStyleSheet("background-color: rgb(255,255, 255)");

这样就可以脱离父窗口的样式

相关文章:

  • 2021-04-21
  • 2021-09-19
  • 2021-08-05
  • 2021-05-18
  • 2021-12-12
  • 2021-11-27
  • 2021-09-16
猜你喜欢
  • 2021-09-16
  • 2021-09-16
  • 2021-12-19
  • 2021-06-28
  • 2021-11-04
  • 2021-08-03
  • 2021-08-03
  • 2021-11-13
相关资源
相似解决方案