Qt 窗体淡入淡出
在开始界面构造函数中添加
1 QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity"); 2 animation>setDuration(1000); 3 animation>setStartValue(0); 4 animation>setEndValue(1); 5 animation>start();在要结束的界面的方法中添加
1 //界面动画,改变透明度的方式消失1 0渐变 2 QPropertyAnimation *animation = new QPropertyAnimation(this, "windowOpacity"); 3 animation>setDuration(1000); 4 animation>setStartValue(1); 5 animation>setEndValue(0); 6 animation>start(); 7 connect(animation, SIGNAL(finished()), this, SLOT(close()));上一篇:Qt 解决报错registered using qRegisterMetaType()
下一篇:Qt 之 QProgressIndicator(等待提示框)
Qt
nsbtx文件怎么看,nsbtx文件用什么打开?
ess文件怎么看,ess文件用什么打开?
esproj文件怎么看,esproj文件用什么打开?
esps文件怎么看,esps文件用什么打开?
8st文件怎么看,8st文件用什么打开?
8med文件怎么看,8med文件用什么打开?
8li文件怎么看,8li文件用什么打开?
8cm文件怎么看,8cm文件用什么打开?
8bx文件怎么看,8bx文件用什么打开?
8by文件怎么看,8by文件用什么打开?