-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqt.html
162 lines (127 loc) · 4.47 KB
/
qt.html
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html>
<head>
<meta name="generator" content="Hugo 0.48" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Qt学习笔记</title>
<link rel="stylesheet" type="text/css" href="/css/cont.css">
<link rel="stylesheet" type="text/css" href="/css/main.css">
<link rel="stylesheet" type="text/css" href="/css/menu.css">
<link rel="icon" href="/imag/ear.jpg" type="image/x-icon" />
</head>
<body>
<div id="background"></div>
<script src="/js/segment.min.js"></script>
<script src="/js/ease.min.js"></script>
<div id="menu">
<div id="menu-icon-wrapper" class="menu-icon-wrapper">
<svg viewBox="0,0,100,100">
<path id="pathA" d="M 30 40 L 70 40 C 90 40 90 75 60 85 A 40 40 0 0 1 20 20 L 80 80" />
<path id="pathB" d="M 30 50 L 70 50" />
<path id="pathC" d="M 70 60 L 30 60 C 10 60 10 20 40 15 A 40 38 0 1 1 20 80 L 80 20" />
</svg>
<button id="menu-icon-trigger" class="menu-icon-trigger"></button>
</div>
<h1 id="D0001"><img src="/imag/ear.jpg" style="width: 30px;height: 30px;" />E&R</h1>
<ul id="menu-list" class="menu-close">
<li><a href="/">HOME</a></li>
<li>
<a href="/posts/"> POSTS</a>
</li>
<li>
<a href="/about/"> ABOUT</a>
</li>
</ul>
</div>
<script type="text/javascript">
var pathA = document.getElementById('pathA'),
pathB = document.getElementById('pathB'),
pathC = document.getElementById('pathC');
segmentA = new Segment(pathA, 8, 32);
segmentB = new Segment(pathB, 8, 32);
segmentC = new Segment(pathC, 8, 32);
function inAC(s) {
s.draw('80% - 24', '80%', 0.3, {
delay: 0.1,
callback: function() {
inAC2(s)
}
});
}
function inAC2(s) {
s.draw('100% - 54.5', '100% - 30.5', 0.6, {
easing: ease.ease('elastic-out', 1, 0.3)
});
}
function inB(s) {
s.draw(8 - 6, 32 + 6, 0.1, {
callback: function() {
inB2(s)
}
});
}
function inB2(s) {
s.draw(8 + 12, 32 - 12, 0.3, {
easing: ease.ease('bounce-out', 1, 0.3)
});
}
function outAC(s) {
s.draw('90% - 24', '90%', 0.1, {
easing: ease.ease('elastic-in', 1, 0.3),
callback: function() {
outAC2(s)
}
});
}
function outAC2(s) {
s.draw('20% - 24', '20%', 0.3, {
callback: function() {
outAC3(s)
}
});
}
function outAC3(s) {
s.draw(8, 32, 0.7, {
easing: ease.ease('elastic-out', 1, 0.3)
});
}
function outB(s) {
s.draw(8, 32, 0.7, {
delay: 0.1,
easing: ease.ease('elastic-out', 2, 0.4)
});
}
var trigger = document.getElementById('menu-icon-trigger'),
toCloseIcon = true;
var list = document.getElementById('menu-list')
trigger.onclick = function() {
if (toCloseIcon) {
inAC(segmentA);
inB(segmentB);
inAC(segmentC);
list.className = "menu-open";
} else {
outAC(segmentA);
outB(segmentB);
outAC(segmentC);
list.className = "menu-close";
}
toCloseIcon = !toCloseIcon;
};
</script>
<div id="container">
<div class="paper">
<h1 class="title">Qt5GUI工程3种基类的区别</h1>
<p>
QMainWindow是一个提供了菜单、工具条的程序主窗口;QWidget是所有图形界面的基类;QDialog是对话框、多用于短时间与用户的交互。QMainWindow和QDialog都是QWidget的子类。
</p>
</div>
<p id="bzoj"><a href="http://jdao.online" target="_blank">
技术支持
</a></p>
<p id="bzoj"><a href="http://www.beian.miit.gov.cn/" target="_blank">
豫ICP备20024227
</a></p>
</div>
</body>