關(guān)于我們
書(shū)單推薦
新書(shū)推薦
|
Qt 5 開(kāi)發(fā)及實(shí)例(第5版) 讀者對(duì)象:本書(shū)既可作為Qt 的學(xué)習(xí)和參考用書(shū),也可作為大學(xué)教材或Qt 5培訓(xùn)用書(shū)。
Qt 是軟件開(kāi)發(fā)領(lǐng)域中非常著名的C++可視化開(kāi)發(fā)平臺(tái)。本書(shū)以Qt 5.15 為平臺(tái),系統(tǒng)介紹Qt 5 的各種功能,在此基礎(chǔ)上配套各種實(shí)例,然后綜合應(yīng)用各種功能開(kāi)發(fā)綜合應(yīng)用實(shí)例。全書(shū)分為以下5 部分。第1 部分為Qt 5 基礎(chǔ)(第1~11 章),內(nèi)容包括Qt 概述,模板庫(kù)、工具類(lèi)及控件,布局管理,基本對(duì)話(huà)框及實(shí)例,主窗口及實(shí)例,事件處理及實(shí)例,繪圖及實(shí)例,文件、目錄與數(shù)據(jù)庫(kù)操作,模型/視圖及實(shí)例,網(wǎng)絡(luò)通信及實(shí)例,定時(shí)器、線(xiàn)程和DLL 庫(kù)。第2 部分為綜合應(yīng)用實(shí)例(第12~15 章),內(nèi)容包括圖元、鼠標(biāo)事件、序列化、工具欄綜合應(yīng)用實(shí)例(我的繪圖板),MDI、文件目錄、樹(shù)、Python綜合應(yīng)用實(shí)例(文檔分析器),網(wǎng)絡(luò)通信、SQLite、圖元系統(tǒng)、實(shí)時(shí)語(yǔ)音綜合應(yīng)用實(shí)例(簡(jiǎn)版微信),多媒體、線(xiàn)程、視頻圖元、MySQL 綜合應(yīng)用實(shí)例(簡(jiǎn)版抖音)。第3 部分為Qt 5.15 和OpenCV 綜合應(yīng)用(第16~18 章),內(nèi)容包括Qt 5.15+OpenCV(含Contrib)-4.6.0 環(huán)境搭建,OpenCV 圖片處理及實(shí)例,OpenCV、樹(shù)控件、表格控件綜合應(yīng)用實(shí)例(醫(yī)院遠(yuǎn)程診斷系統(tǒng))。第4 部分為QML 編程基礎(chǔ)、QML 動(dòng)畫(huà)特效和Qt Quick Controls 開(kāi)發(fā)基礎(chǔ)(第19~21 章)。第5 部分為網(wǎng)絡(luò)資源文件和文檔(可免費(fèi)下載),包括本書(shū)所有實(shí)例和綜合應(yīng)用實(shí)例的工程文件、21 個(gè)PPT 教學(xué)培訓(xùn)課件、57 個(gè)實(shí)例開(kāi)發(fā)教學(xué)視頻文件、電子商城系統(tǒng)綜合實(shí)例文檔、MyWord 字處理軟件綜合實(shí)例文檔,Qt 5 操作Office 實(shí)例文檔等。附錄A 為Qt 5 簡(jiǎn)單調(diào)試。本書(shū)既可作為Qt 5 開(kāi)發(fā)人員的學(xué)習(xí)和參考用書(shū),也可作為高等院校相關(guān)專(zhuān)業(yè)教材或Qt 5 培訓(xùn)用書(shū)。
鄭阿奇,副教授,曾任教于南京師范大學(xué)。先后主編出版計(jì)算機(jī)教材和圖書(shū)超過(guò)100本,受到市場(chǎng)廣泛好評(píng)。出版的教材曾獲得高等教育國(guó)家“十一五”規(guī)劃教材、高等職業(yè)教育“十二五”國(guó)家規(guī)劃教材、高等職業(yè)教育“十三五”國(guó)家規(guī)劃教材、江蘇省高等職業(yè)教育“十四五”規(guī)劃教材、江蘇省教學(xué)成果二等獎(jiǎng)、高等職業(yè)教育優(yōu)秀教材一等獎(jiǎng)等榮譽(yù)。
第1 章 Qt 概述·······································································································.1
1.1 什么是Qt···································································································.1 1.1.1 Qt 的產(chǎn)生和發(fā)展···················································································.1 1.1.2 Qt 5.15 與Qt 6 ······················································································.2 1.2 Qt 5.15 的安裝····························································································.2 1.2.1 下載Qt 在線(xiàn)安裝器和申請(qǐng)免費(fèi)賬號(hào)··························································.2 1.2.2 安裝過(guò)程·····························································································.4 1.2.3 運(yùn)行Qt Creator ·····················································································.7 1.2.4 Qt 5.15 開(kāi)發(fā)環(huán)境···················································································.8 1.3 Qt 5.15 開(kāi)發(fā)入門(mén)實(shí)例·················································································.9 1.3.1 設(shè)計(jì)器Qt Designer 開(kāi)發(fā)實(shí)例··································································.10 1.3.2 直接代碼開(kāi)發(fā)實(shí)例···············································································.19 第2 章 模板庫(kù)、工具類(lèi)及控件··············································································.24 2.1 字符串類(lèi)··································································································.24 2.1.1 操作字符串························································································.24 2.1.2 查詢(xún)字符串?dāng)?shù)據(jù)··················································································.25 2.1.3 字符串的轉(zhuǎn)換·····················································································.26 2.2 容器類(lèi)·····································································································.27 2.2.1 QList、QLinkedList 和QVector ·······························································.28 2.2.2 QMap 和QHash ··················································································.33 2.3 QVariant ···································································································.36 2.4 算法及正則表達(dá)式····················································································.38 2.4.1 常用算法···························································································.38 2.4.2 基本的正則表達(dá)式···············································································.39 2.5 控件·········································································································.40 2.5.1 按鈕組(Buttons) ··············································································.40 2.5.2 輸入部件組(Input Widgets)·································································.42 2.5.3 顯示控件組(Display Widgets)······························································.43 2.5.4 空間間隔組(Spacers) ········································································.44 2.5.5 布局管理組(Layouts) ········································································.44 2.5.6 容器組(Containers)···········································································.44 2.5.7 項(xiàng)目視圖組(Item Views) ····································································.46 2.5.8 項(xiàng)目控件組(Item Widgets)··································································.48 2.5.9 多控件實(shí)例························································································.52 第3 章 布局管理···································································································.56 3.1 分割窗口類(lèi):QSplitter··············································································.56 3.2 ?看翱陬(lèi):QDockWidget ······································································.58 3.3 堆棧窗體類(lèi):QStackedWidget ···································································.60 3.4 基本布局類(lèi):QLayout ··············································································.62 3.5 布局管理綜合實(shí)例····················································································.67 第4 章 基本對(duì)話(huà)框及實(shí)例·····················································································.78 4.1 標(biāo)準(zhǔn)文件對(duì)話(huà)框類(lèi)····················································································.81 4.1.1 函數(shù)說(shuō)明···························································································.81 4.1.2 創(chuàng)建步驟···························································································.82 4.2 標(biāo)準(zhǔn)顏色對(duì)話(huà)框類(lèi)····················································································.83 4.2.1 函數(shù)說(shuō)明···························································································.83 4.2.2 創(chuàng)建步驟···························································································.83 4.3 標(biāo)準(zhǔn)字體對(duì)話(huà)框類(lèi)····················································································.84 4.3.1 函數(shù)說(shuō)明···························································································.84 4.3.2 創(chuàng)建步驟···························································································.84 4.4 標(biāo)準(zhǔn)輸入對(duì)話(huà)框類(lèi)····················································································.85 4.4.1 標(biāo)準(zhǔn)字符串輸入對(duì)話(huà)框·········································································.88 4.4.2 標(biāo)準(zhǔn)條目選擇對(duì)話(huà)框············································································.89 4.4.3 標(biāo)準(zhǔn)int 類(lèi)型輸入對(duì)話(huà)框·······································································.89 4.4.4 標(biāo)準(zhǔn)double 類(lèi)型輸入對(duì)話(huà)框··································································.90 4.5 消息對(duì)話(huà)框類(lèi)···························································································.91 4.5.1 Question 消息對(duì)話(huà)框············································································.93 4.5.2 Information 消息對(duì)話(huà)框·········································································.94 4.5.3 Warning 消息對(duì)話(huà)框·············································································.95 4.5.4 Critical 消息對(duì)話(huà)框··············································································.95 4.5.5 About 消息對(duì)話(huà)框···············································································.96 4.5.6 About Qt 消息對(duì)話(huà)框············································································.96 4.6 自定義消息對(duì)話(huà)框····················································································.97 4.7 工具盒類(lèi)··································································································.98 4.8 進(jìn)度條····································································································.102 4.9 調(diào)色板與電子鐘······················································································.106 4.9.1 QPalette ····························································································106 4.9.2 QTime ·····························································································.111 4.9.3 電子鐘實(shí)例·······················································································.112 4.10 可擴(kuò)展對(duì)話(huà)框························································································.115 4.11 不規(guī)則窗體····························································································.118 4.12 程序啟動(dòng)畫(huà)面類(lèi):QSplashScreen····························································.120 第5 章 主窗口及實(shí)例···························································································.123 5.1 主窗口構(gòu)成·····························································································.123 5.1.1 基本元素··························································································.123 5.1.2 文本編輯器項(xiàng)目框架···········································································.124 5.1.3 菜單與工具欄的實(shí)現(xiàn)···········································································.127 5.2 文件操作功能··························································································.131 5.2.1 新建文件··························································································.131 5.2.2 打開(kāi)文件··························································································.132 5.2.3 打印文件··························································································.134 5.3 圖像坐標(biāo)變換··························································································.137 5.3.1 縮放功能··························································································.137 5.3.2 旋轉(zhuǎn)功能··························································································.138 5.3.3 鏡像功能··························································································.140 5.4 文本編輯功能··························································································.141 5.4.1 設(shè)置字體··························································································.143 5.4.2 設(shè)置字號(hào)··························································································.144 5.4.3 設(shè)置文字加粗····················································································.144 5.4.4 設(shè)置文字斜體····················································································.145 5.4.5 設(shè)置文字加下畫(huà)線(xiàn)··············································································.145 5.4.6 設(shè)置文字顏色····················································································.145 5.4.7 設(shè)置字符格式····················································································.146 5.5 排版功能·································································································.146 5.5.1 實(shí)現(xiàn)段落對(duì)齊····················································································.147 5.5.2 實(shí)現(xiàn)文本排序····················································································.148 第6 章 事件處理及實(shí)例·······················································································.151 6.1 鼠標(biāo)事件·································································································.151 6.2 鍵盤(pán)事件·································································································.153 6.3 事件過(guò)濾器·····························································································.159 第7 章 繪圖及實(shí)例······························································································.164 7.1 基礎(chǔ)圖形的繪制······················································································.164 7.1.1 繪圖基礎(chǔ)類(lèi)·······················································································.164 7.1.2 QPainter 繪圖框架實(shí)例········································································.174 7.1.3 繪制實(shí)時(shí)時(shí)鐘實(shí)例··············································································.187 7.2 GraphicsView 繪圖···················································································.190 7.2.1 視圖、場(chǎng)景、圖元的概念·····································································.190 7.2.2 GraphicsView 坐標(biāo)系統(tǒng)········································································.192 7.2.3 飛舞的蝴蝶實(shí)例·················································································.193 7.3 二維圖表繪制··························································································.196 7.3.1 QtCharts 基礎(chǔ)····················································································.196 7.3.2 繪制螺旋曲線(xiàn)實(shí)例··············································································.198 7.3.3 繪制柱狀/折線(xiàn)圖實(shí)例··········································································.201 7.3.4 繪制餅狀圖實(shí)例·················································································.203 7.4 三維繪圖·································································································.205 7.4.1 QtDataVisualization 基礎(chǔ)······································································.205 7.4.2 三維繪圖實(shí)例····················································································.207 第8 章 文件、目錄與數(shù)據(jù)庫(kù)操作·········································································.210 8.1 文件操作·································································································.210 8.1.1 文本文件操作實(shí)例··············································································.210 8.1.2 二進(jìn)制文件操作實(shí)例···········································································.213 8.2 目錄操作·································································································.215 8.2.1 文件大小及路徑獲取實(shí)例·····································································.215 8.2.2 文件系統(tǒng)瀏覽實(shí)例··············································································.217 8.2.3 獲取文件信息實(shí)例··············································································.220 8.3 數(shù)據(jù)庫(kù)操作·····························································································.224 8.3.1 數(shù)據(jù)庫(kù)與SQL 基礎(chǔ)············································································.224 8.3.2 QtSql································································································231 8.3.3 操作SQLite 實(shí)例···············································································.233 8.3.4 操作MySQL 實(shí)例··············································································.237 8.3.5 操作SQL Server 實(shí)例··········································································.243 第9 章 模型/視圖及實(shí)例······················································································.248 9.1 模型/視圖架構(gòu)·························································································.248 9.1.1 基本概念··························································································.248 9.1.2 實(shí)現(xiàn)類(lèi)·····························································································.249 9.2 常用模型/視圖組件實(shí)例···········································································.250 9.2.1 表格模型/視圖及實(shí)例··········································································.250 9.2.2 樹(shù)狀模型/視圖及實(shí)例··········································································.253 9.2.3 文件目錄瀏覽器實(shí)例···········································································.256 9.2.4 自定義模型實(shí)例·················································································.258 9.3 代理及應(yīng)用實(shí)例······················································································.262 9.3.1 代理概念及開(kāi)發(fā)步驟···········································································.262 9.3.2 代理應(yīng)用實(shí)例····················································································.264 9.4 綜合實(shí)例:汽車(chē)信息管理系統(tǒng)·································································.271 9.4.1 開(kāi)發(fā)前的準(zhǔn)備····················································································.272 9.4.2 開(kāi)發(fā)視圖界面····················································································.273 9.4.3 連接數(shù)據(jù)庫(kù)·······················································································.276 9.4.4 開(kāi)發(fā)主/從視圖···················································································.283 9.4.5 添加/刪除汽車(chē)信息·············································································.287 第10 章 網(wǎng)絡(luò)通信及實(shí)例·····················································································.296 10.1 獲取本機(jī)網(wǎng)絡(luò)信息·················································································.296 10.2 基于UDP 的數(shù)據(jù)通信············································································.299 10.2.1 UDP 工作原理·················································································.299 10.2.2 UDP 應(yīng)用實(shí)例·················································································.301 10.3 基于TCP 的數(shù)據(jù)通信············································································.306 10.3.1 TCP 工作原理··················································································.306 10.3.2 TCP 應(yīng)用實(shí)例··················································································.309 第11 章 定時(shí)器、線(xiàn)程和DLL 庫(kù)··········································································.320 11.1 定時(shí)器和線(xiàn)程························································································.320 11.1.1 定時(shí)器:QTimer···············································································.320 11.1.2 線(xiàn)程:QThread·················································································.322 11.2 Qt 程序開(kāi)發(fā)和調(diào)用DLL 庫(kù)····································································.326 11.2.1 開(kāi)發(fā)DLL························································································.326 11.2.2 使用DLL························································································.329 第12 章 圖元、鼠標(biāo)事件、序列化、工具欄綜合應(yīng)用實(shí)例:我的繪圖板···············.334 【技術(shù)基礎(chǔ)】···································································································.335 12.1 繪圖相關(guān)技術(shù)························································································.335 12.2 繪圖場(chǎng)景數(shù)據(jù)結(jié)構(gòu)·················································································.336 12.2.1 數(shù)據(jù)結(jié)構(gòu)設(shè)計(jì)··················································································.336 12.2.2 數(shù)據(jù)結(jié)構(gòu)實(shí)現(xiàn)··················································································.337 12.2.3 數(shù)據(jù)結(jié)構(gòu)處理··················································································.339 【實(shí)例開(kāi)發(fā)】···································································································.341 12.3 創(chuàng)建項(xiàng)目·······························································································.341 12.3.1 項(xiàng)目設(shè)置························································································.341 12.3.2 界面設(shè)計(jì)························································································.344 12.3.3 程序框架························································································.346 12.4 主界面開(kāi)發(fā)···························································································.350 12.4.1 文件管理欄開(kāi)發(fā)···············································································.350 12.4.2 樣式欄開(kāi)發(fā)·····················································································.351 12.4.3 工具箱開(kāi)發(fā)·····················································································.355 12.4.4 繪圖區(qū)和狀態(tài)欄開(kāi)發(fā)·········································································.356 12.5 繪圖功能開(kāi)發(fā)························································································.359 12.5.1 創(chuàng)建圖元························································································.359 12.5.2 調(diào)整圖元大小··················································································.365 12.5.3 設(shè)置樣式························································································.368 12.5.4 操縱圖元························································································.376 12.6 圖元文件管理························································································.377 第13 章 MDI、文件目錄、樹(shù)、Python 綜合應(yīng)用實(shí)例:文檔分析器······················.383 【技術(shù)基礎(chǔ)】···································································································.384 【實(shí)例開(kāi)發(fā)】···································································································.384 13.1 創(chuàng)建項(xiàng)目·······························································································.384 13.1.1 項(xiàng)目設(shè)置························································································.384 13.1.2 界面設(shè)計(jì)························································································.388 13.1.3 程序框架························································································.391 13.2 文檔的管理···························································································.398 13.2.1 目錄導(dǎo)航························································································.398 13.2.2 文檔歸類(lèi)························································································.399 13.2.3 打開(kāi)文檔························································································.401 13.2.4 多文檔窗口布局···············································································.403 13.3 文檔的分析···························································································.405 13.3.1 文本的分析·····················································································.406 13.3.2 獲取網(wǎng)頁(yè)主題鏈接············································································.410 13.3.3 識(shí)別、掃描書(shū)頁(yè)文字·········································································.412 13.3.4 分析結(jié)果處理··················································································.417 13.4 其他功能·······························································································.418 第14 章 網(wǎng)絡(luò)通信、SQLite、圖元系統(tǒng)、實(shí)時(shí)語(yǔ)音綜合應(yīng)用實(shí)例:簡(jiǎn)版微信········.420 【技術(shù)基礎(chǔ)】···································································································.421 14.1 網(wǎng)絡(luò)通信·······························································································.421 14.1.1 UDP 收發(fā)消息·················································································.421 14.1.2 TCP 傳輸························································································.423 14.2 服務(wù)器數(shù)據(jù)庫(kù)························································································.425 14.2.1 創(chuàng)建數(shù)據(jù)庫(kù)MyWeDb·········································································.425 14.2.2 數(shù)據(jù)庫(kù)訪(fǎng)問(wèn)與操作············································································.426 14.3 SQLite 應(yīng)用···························································································.427 14.3.1 創(chuàng)建SQLite·····················································································.427 14.3.2 記錄日志························································································.428 14.3.3 加載日志························································································.429 14.4 用到的其他控件和技術(shù)··········································································.430 【實(shí)例開(kāi)發(fā)】···································································································.430 14.5 創(chuàng)建項(xiàng)目·······························································································.430 14.5.1 客戶(hù)端項(xiàng)目·····················································································.430 14.5.2 服務(wù)器項(xiàng)目·····················································································.440 14.6 界面開(kāi)發(fā)·······························································································.443 14.6.1 界面設(shè)計(jì)························································································.443 14.6.2 初始化···························································································.446 14.6.3 界面切換························································································.448 14.7 基本功能開(kāi)發(fā)························································································.449 14.7.1 用戶(hù)管理························································································.449 14.7.2 文字聊天························································································.454 14.7.3 信息暫存與轉(zhuǎn)發(fā)···············································································.457 14.8 增強(qiáng)功能開(kāi)發(fā)························································································.459 14.8.1 功能演示························································································.459 14.8.2 文件、圖片、語(yǔ)音的傳輸···································································.461 14.8.3 實(shí)時(shí)語(yǔ)音通話(huà)··················································································.472 第15 章 多媒體、線(xiàn)程、視頻圖元、MySQL 綜合應(yīng)用實(shí)例:簡(jiǎn)版抖音·················.477 【技術(shù)基礎(chǔ)】···································································································.477 15.1 視頻播放處理························································································.477 15.2 MySQL 數(shù)據(jù)庫(kù)······················································································.478 15.2.1 設(shè)計(jì)數(shù)據(jù)庫(kù)MyTikTok ·······································································.478 15.2.2 訪(fǎng)問(wèn)與操作數(shù)據(jù)庫(kù)············································································.480 15.2.3 特殊數(shù)據(jù)類(lèi)型讀寫(xiě)············································································.481 【實(shí)例開(kāi)發(fā)】···································································································.481 15.3 創(chuàng)建項(xiàng)目·······························································································.481 15.3.1 項(xiàng)目結(jié)構(gòu)························································································.481 15.3.2 主程序框架·····················································································.485 15.4 主界面開(kāi)發(fā)···························································································.489 15.4.1 界面設(shè)計(jì)························································································.489 15.4.2 初始化···························································································.491 15.4.3 運(yùn)行效果························································································.492 15.5 視頻基本功能開(kāi)發(fā)·················································································.492 15.5.1 視頻播放························································································.492 15.5.2 視頻控制························································································.497 15.5.3 視頻信息顯示··················································································.498 15.6 特色功能開(kāi)發(fā)························································································.501 15.6.1 關(guān)注和點(diǎn)贊·····················································································.501 15.6.2 評(píng)論與彈幕·····················································································.505 15.6.3 根據(jù)用戶(hù)喜好推薦視頻······································································.509 15.7 視頻發(fā)布·······························································································.513 15.7.1 界面設(shè)計(jì)························································································.513 15.7.2 視頻預(yù)覽························································································.514 15.7.3 視頻發(fā)布························································································.515 第16 章 Qt 5.15+OpenCV(含Contrib)-4.6.0 環(huán)境搭建····································.519 16.1 準(zhǔn)備工作·······························································································.519 16.2 配置編譯器···························································································.522 16.3 編譯OpenCV·························································································.527 16.4 安裝OpenCV·························································································.528 第17 章 OpenCV 圖片處理及實(shí)例·······································································.531 17.1 圖片美化·······························································································.531 17.1.1 圖片增強(qiáng)························································································.531 17.1.2 平滑濾波························································································.537 17.2 多圖合成·······························································································.543 17.2.1 程序界面························································································.544 17.2.2 全局變量及方法···············································································.545 17.2.3 初始化顯示·····················································································.545 17.2.4 功能實(shí)現(xiàn)························································································.546 17.2.5 運(yùn)行效果························································································.547 17.3 圖片旋轉(zhuǎn)縮放························································································.548 17.3.1 程序界面························································································.548 17.3.2 全局變量及方法···············································································.549 17.3.3 初始化顯示·····················································································.550 17.3.4 功能實(shí)現(xiàn)························································································.551 17.3.5 運(yùn)行效果························································································.552 17.4 圖片智能識(shí)別························································································.553 17.4.1 尋找匹配物體··················································································.553 17.4.2 人臉識(shí)別························································································.557 第18 章 OpenCV、樹(shù)控件、表格控件綜合應(yīng)用實(shí)例:醫(yī)院遠(yuǎn)程診斷系統(tǒng)············.563 18.1 功能需求·······························································································.563 18.1.1 診療點(diǎn)科室管理···············································································.563 18.1.2 CT 相片顯示和處理···········································································.564 18.1.3 患者信息選項(xiàng)卡···············································································.564 18.1.4 后臺(tái)數(shù)據(jù)庫(kù)瀏覽···············································································.564 18.1.5 界面的總體效果···············································································.565 18.2 Qt 項(xiàng)目工程創(chuàng)建與配置·········································································.565 18.3 界面設(shè)計(jì)·······························································································.567 18.4 功能實(shí)現(xiàn)·······························································································.570 18.4.1 數(shù)據(jù)庫(kù)準(zhǔn)備·····················································································.570 18.4.2 Qt 應(yīng)用程序主體框架········································································.572 18.4.3 界面初始化功能實(shí)現(xiàn)·········································································.577 18.4.4 診斷功能實(shí)現(xiàn)··················································································.578 18.4.5 患者信息表單··················································································.581 18.5 醫(yī)院遠(yuǎn)程診斷系統(tǒng)運(yùn)行演示···································································.583 18.5.1 啟動(dòng)、連接數(shù)據(jù)庫(kù)············································································.583 18.5.2 執(zhí)行診斷分析··················································································.584 18.5.3 表單信息聯(lián)動(dòng)··················································································.585 18.5.4 查看病歷························································································.586 第19 章 QML 編程基礎(chǔ)·······················································································.587 19.1 QML 概述·····························································································.587 19.1.1 第一個(gè)QML 程序·············································································.588 19.1.2 QML 文檔構(gòu)成·················································································.592 19.2 QML 可視元素······················································································.595 19.2.1 矩形元素:Rectangle ·········································································.595 19.2.2 圖像元素:Image··············································································.596 19.2.3 文本元素:Text················································································.598 19.2.4 自定義元素(組件) ·········································································.600 19.3 QML 元素布局······················································································.602 19.3.1 定位器:Positioner ············································································.602 19.3.2 錨:Anchor ·····················································································.607 19.4 QML 事件處理······················································································.611 19.4.1 鼠標(biāo)事件························································································.611 19.4.2 鍵盤(pán)事件························································································.613 19.4.3 輸入控件與焦點(diǎn)···············································································.616 19.5 QML 集成JavaScript··············································································.618 19.5.1 調(diào)用JavaScript 函數(shù)··········································································.618 19.5.2 導(dǎo)入JS 文件····················································································.620 第20 章 QML 動(dòng)畫(huà)特效·······················································································.623 20.1 QML 動(dòng)畫(huà)元素······················································································.623 20.1.1 PropertyAnimation 元素······································································.623 20.1.2 其他動(dòng)畫(huà)元素··················································································.628 20.1.3 Animator 元素··················································································.630 20.2 流UI 界面·····························································································.632 20.2.1 狀態(tài)切換機(jī)制··················································································.632 20.2.2 設(shè)計(jì)組合動(dòng)畫(huà)··················································································.635 20.3 圖像特效·······························································································.638 20.3.1 3D 旋轉(zhuǎn)··························································································.638 20.3.2 色彩處理························································································.639 第21 章 Qt Quick Controls 開(kāi)發(fā)基礎(chǔ)···································································.642 21.1 Qt Quick Controls 概述···········································································.642 21.1.1 第一個(gè)Qt Quick Controls 程序·····························································.642 21.1.2 更換界面主題樣式············································································.644 21.2 Qt Quick 控件························································································.645 21.2.1 概述······························································································.645 21.2.2 基本控件························································································.645 21.2.3 高級(jí)控件························································································.650 21.2.4 樣式定制························································································.654 21.3 Qt Quick 對(duì)話(huà)框·····················································································.662 21.4 Qt Quick 選項(xiàng)標(biāo)簽·················································································.667 附錄A Qt 5 簡(jiǎn)單調(diào)試···························································································.673 A.1 修正語(yǔ)法錯(cuò)誤·························································································.673 A.2 設(shè)置斷點(diǎn)································································································.674 A.3 程序調(diào)試運(yùn)行·························································································.674 A.4 查看和修改變量的值··············································································.675 A.5 qDebug()的用法······················································································.677
你還可能感興趣
我要評(píng)論
|