Can't add shadow to frameless window
			
			General and Desktop
		
1
Posts
1
Posters
1.8k
Views
1
Watching
- 
How to add a full shadow to MainWindow or centralwidget? I already use this 
 Not work for me =
 and also try different flags:setAttribute(Qt::WA_TranslucentBackground); //enable MainWindow to be transparent setMask(geometry()); this->setWindowFlags(Qt::SplashScreen); //enable MainWindow to be transparent this->setWindowFlags( Qt::FramelessWindowHint); //enable MainWindow to be transparentand also show()
 and apply shadow effectCustomShadowEffect* shadowEffect = new CustomShadowEffect(); shadowEffect->setBlurRadius(9.0); shadowEffect->setDistance(6.0); shadowEffect->setColor(QColor(0, 0, 0, 80)); this->centralWidget->setAutoFillBackground(true); this->centralWidget->setGraphicsEffect(shadowEffect);
