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

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

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

相关文章:

  • 2021-09-19
  • 2021-12-21
  • 2021-08-05
  • 2021-12-12
  • 2021-11-04
  • 2022-01-14
猜你喜欢
  • 2021-06-18
  • 2021-06-24
  • 2021-11-23
  • 2021-04-15
  • 2021-11-29
  • 2021-05-18
  • 2021-04-21
相关资源
相似解决方案