-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathch12-00.htm
More file actions
47 lines (37 loc) · 2.44 KB
/
Copy pathch12-00.htm
File metadata and controls
47 lines (37 loc) · 2.44 KB
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
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>ch12-00</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="thumbnailviewer.css" type="text/css" />
<script src="thumbnailviewer.js" type="text/javascript">
/***********************************************
* Image Thumbnail Viewer Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script> </head>
<div class="os1">第12章 主窗口程序</div>
<br />
本章介绍 QMainWindow 主窗口程序及相关组件的开发。QMainWindow 通常用于开发功能较为复杂的软件,主要包括中央部件、菜单栏、工具栏、状态栏、停靠窗口等组件,并可以保存窗口的尺寸状态,下次打开程序就可以恢复窗口尺寸状态,本章会逐个介绍这些功能组件的使用。
<br />
<br />
本章 12.1 节主要介绍 QMainWindow 主窗口类、QMenu 菜单类,并创建一个基于主窗口类的看图软件示例,该示例将贯穿本章内容,后续几节逐步添加功能组件代码。<br />
12.2 节介绍 QToolBar 工具栏和 QStatusBar 状态栏内容,为看图示例添加工具栏和状态栏功能代码。<br />
12.3 节介绍 QDockWidget 停靠窗口,为看图示例添加多个停靠窗口代码。<br />
12.4 节介绍如何为窗口添加拖入文件打开功能,并介绍打印输出 pdf 格式文件的功能。<br />
12.5 节介绍 QSettings 设置保存和加载功能,可以保存窗口的尺寸状态,并且可以存储最近打开文件列表。<br />
<br />
<br />
<br />
<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 40%;"><div style="text-align: center;"><a href="ch11-05.htm"><img class="pic" style="width: 32px; height: 32px;" alt="prev" src="images/pics/prev.png" /></a></div></td>
<td style="width: 20%;"><div style="text-align: center;"><a href="contents.htm"><img class="pic" style="width: 32px; height: 32px;" alt="contents" src="images/pics/contents.png" /></a></div></td>
<td style="width: 40%;"><div style="text-align: center;"><a href="ch12-01.htm"><img class="pic" style="width: 32px; height: 32px;" alt="next" src="images/pics/next.png" /></a></div></td>
</tr>
</tbody>
</table>
</html>