Advanced QT programming: creating great software with C++ and QT 4
9780321635907, 0321635906, 9780134670874, 0134670876
Master Qt's Most Powerful APIs, Patterns, and Development PracticesQt has evolved into a remarkably powerful soluti
405
70
5MB
English
Pages xvi, 536 pages: illustrations; 24 cm
[560]
Year 2010;2016
Report DMCA / Copyright
DOWNLOAD PDF FILE
Table of contents :
Cover......Page 1
Contents......Page 10
List of Tables......Page 14
Foreword......Page 16
Introduction......Page 18
Acknowledgements......Page 20
Chapter 1. Hybrid Desktop/Internet Applications......Page 22
Internet-Aware Widgets......Page 23
Using WebKit......Page 38
A Generic Web Browser Window Component......Page 39
Creating Web Site-Specific Applications......Page 47
Embedding Qt Widgets in Web Pages......Page 61
Chapter 2. Audio and Video......Page 70
Using QSound and QMovie......Page 71
The Phonon Multimedia Framework......Page 77
Playing Music......Page 81
Playing Videos......Page 97
Chapter 3. Model/View Table Models......Page 104
Qt’s Model/View Architecture......Page 105
Using QStandardItemModels for Tables......Page 107
Changing a Table Model through the User Interface......Page 108
A QStandardItemModel Subclass for Tables......Page 119
A QSortFilterProxyModel to Filter Out Duplicate Rows......Page 124
A QSortFilterProxyModel to Filter In Wanted Rows......Page 126
Changing a Table Model through the User Interface......Page 130
A CustomQAbstractTableModel Subclass for Tables......Page 133
Chapter 4. Model/View Tree Models......Page 146
Using QStandardItemModels for Trees......Page 147
Changing a Tree Model through the User Interface......Page 148
A QStandardItem Subclass for Tree Items......Page 158
A QStandardItemModel Subclass for Trees......Page 160
Creating Custom Tree Models......Page 168
Changing a Tree Model through the User Interface......Page 169
A Custom Item Class for Tree Items......Page 172
A CustomQAbstractItemModel Subclass for Trees......Page 175
Chapter 5. Model/View Delegates......Page 202
Datatype-Specific Editors......Page 203
A Read–Only Column or Row Delegate......Page 205
An Editable Column or Row Delegate......Page 210
Model-Specific Delegates......Page 218
Chapter 6. Model/View Views......Page 224
QAbstractItemView Subclasses......Page 225
Model-Specific Visualizing Views......Page 241
The Visualizer Widget......Page 242
The Visualizer’s Aggregated Header Widget......Page 249
The Visualizer’s Aggregated View Widget......Page 252
Chapter 7. Threading with QtConcurrent......Page 262
Executing Functions in Threads......Page 265
Using QtConcurrent::run()......Page 269
Using QRunnable......Page 274
Filtering and Mapping in Threads......Page 278
Using QtConcurrent to Filter......Page 287
Using QtConcurrent to Filter and Reduce......Page 294
Using QtConcurrent to Map......Page 298
Processing Independent Items......Page 304
Processing Shared Items......Page 319
Chapter 9. Creating Rich Text Editors......Page 334
Introducing QTextDocument......Page 335
Completion for Line Edits and Comboboxes......Page 337
Completion and Syntax Highlighting for Text Editors......Page 339
A Rich Text Single Line Editor......Page 359
Multi-line Rich Text Editing......Page 370
Chapter 10. Creating Rich Text Documents......Page 376
Exported QTextDocument File Quality......Page 378
Creating QTextDocuments with HTML......Page 381
Creating QTextDocuments with QTextCursor......Page 384
Exporting and Printing Documents......Page 388
Exporting QTextDocuments......Page 389
Printing and Previewing QTextDocuments......Page 393
Painting Pages......Page 396
Painting SVG......Page 404
Painting Pixmaps......Page 405
Chapter 11. Creating Graphics/View Windows......Page 406
The Graphics/View Architecture......Page 407
Graphics/View Widgets and Layouts......Page 409
Introducing Graphics Items......Page 416
Chapter 12. Creating Graphics/View Scenes......Page 426
Scenes, Items, and Actions......Page 428
Creating the Main Window......Page 429
Saving, Loading, Printing, and Exporting Scenes......Page 432
Manipulating Graphics Items......Page 440
Enhancing QGraphicsView......Page 456
Creating a Dock Widget Toolbox......Page 457
Enhancing QGraphicsTextItem......Page 464
Enhancing an Existing Graphics Item......Page 472
Creating a Custom Graphics Item from Scratch......Page 476
Introducing the Animation Framework......Page 486
Introducing the State Machine Framework......Page 491
Combining Animations and State Machines......Page 498
Epilogue......Page 508
Selected Bibliography......Page 512
A......Page 516
B......Page 517
C......Page 518
D......Page 520
E......Page 521
F......Page 522
G......Page 523
I......Page 524
L......Page 526
M......Page 527
O......Page 528
P......Page 529
Q......Page 530
R......Page 544
S......Page 545
T......Page 550
U......Page 551
W......Page 552
Z......Page 553