2019-9-15
- Qt Style
QStyle风格和QPalette调色板
- Qt Style Sheets
样式表比调色板强大的多。
- Special effects Form
1) irregular forms
使用部件遮罩mask来实现
2) the transparent window
setWindowOpacity(0.5);// 设置窗口的不透明度为0.5
//此时所有部件都是透明的
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
//窗口全透明,部件不透明,没有了标题栏和边框
重写paintEvent函数
//窗口可以实现半透明效果
也可以使用QGraphicsDropShadowEffect创建阴影效果
3) to achieve ground-glass effect win7