QWidget实现透明的方式

1     this->setWindowFlags(Qt::FramelessWindowHint);
2     this->setAttribute(Qt::WA_TranslucentBackground, true);

特别注意:

不能把QWidget设置为最大化,也就是不能调用showMinimized()这个函数,它调用后窗口永远设置不了透明。

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-06-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-12-17
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案