不知道是bug还是新的规则,Qt 5.x里设置透明背景的规则如下:
top-level窗体:
this->setAttribute( Qt::WA_TranslucentBackground,true );
this->setWindowFlags( Qt::FramelessWindowHint );
top-level窗体的中央(centralWidget)空间,设置png背景即可.
不知道是bug还是新的规则,Qt 5.x里设置透明背景的规则如下:
top-level窗体:
this->setAttribute( Qt::WA_TranslucentBackground,true );
this->setWindowFlags( Qt::FramelessWindowHint );
top-level窗体的中央(centralWidget)空间,设置png背景即可.