setWindowFlags(Qt::WindowStaysOnTopHint | Qt::SplashScreen | Qt::FramelessWindowHint);

setAttribute(Qt::WA_NoBackground, true);
setAttribute(Qt::WA_NoSystemBackground, true);
setAttribute(Qt::WA_TranslucentBackground, true);


解决SplashScreen无法加载Stylesheet
void MySplash::paintEvent(QPaintEvent *e)
{
    //强制StyleSheet生效
    QStyleOption opt;
    opt.init(this);
    QPainter p(this);
    style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);

    return QSplashScreen::paintEvent(e);

};

http://www.qtcn.org/bbs/read-htm-tid-61177.html

相关文章:

  • 2021-08-22
  • 2021-11-27
  • 2022-12-23
  • 2021-06-12
  • 2023-01-06
  • 2021-11-11
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-12-27
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案