·UI模式的QSS設定
rgba(xxx,xxx,xxx,100);
a就是透明度(alpha)的意思啦,0-255。
0則完全透明、255完全不透明,100就是半透明啦
·代碼設定
setWindowOpacity(n),n範圍0.0~1.0,1.0完全不透明,全局設定
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);
·UI模式的QSS設定
rgba(xxx,xxx,xxx,100);
a就是透明度(alpha)的意思啦,0-255。
0則完全透明、255完全不透明,100就是半透明啦
·代碼設定
setWindowOpacity(n),n範圍0.0~1.0,1.0完全不透明,全局設定
setWindowFlags(Qt::FramelessWindowHint);
setAttribute(Qt::WA_TranslucentBackground);