-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (24 loc) · 902 Bytes
/
main.cpp
File metadata and controls
34 lines (24 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "widget.h"
#include <QApplication>
#include <QTextCodec>
#include <QString>
#include <QStringList>
int main(int argc, char *argv[])
{
QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
QApplication a(argc, argv);
qApp->addLibraryPath(".");
Widget w;
//w.setGraphicsEffect(new QGraphicsDropShadowEffect);
w.setWindowFlags(Qt::FramelessWindowHint);
w.setAttribute(Qt::WA_TranslucentBackground);
QPropertyAnimation *animation = new QPropertyAnimation(&w, "geometry"); //´ò¿ªÈí¼þ¾íÖáÕ¹¿ªÐ§¹û
animation->setDuration(1000);
animation->setStartValue(QRect(605, 0, 0, 770));
animation->setEndValue(QRect(0, 0, 1210, 770));
animation->setEasingCurve(QEasingCurve::InOutQuad);
animation->start();
w.show();
return a.exec();
}