用Qt可以做出很炫的界面,更多的功能还有待学习^_^!
1、构造函数中需要做的设置:
this->setWindowOpacity(1);//设置窗体不透明
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint);//设置窗体无边框,允许任务栏按钮右键菜单
this->setAttribute(Qt::WA_TranslucentBackground);//设置背景透明
mouseMovePos = QPoint(0, 0);
movie->setFileName(":/new/prefix1/welcome.gif");
ui->label->setMovie(movie);
ui->label->setScaledContents(true);
movie->start();
因为加载的是动态图片,所以要用movie启动动画。
2、鼠标移动和点击事件的设置: