List of Tables xiii Foreword xv Introduction 1 Chapter 1: Hybrid Desktop/Internet Applications 5Internet-Aware Widgets 6Using WebKit 21 Chapter 2: Audio and Video 53Using QSound and QMovie 54The Phonon Multimedia Framework 60 Chapter 3: Model/View Table Models 87Qt's Model/View Architecture 88Using QStandardItemModels for Tables 90Creating Custom Table Models 113 Chapter 4: Model/View Tree Models 129Using QStandardItemModels for Trees 130Creating Custom Tree Models 151 Chapter 5: Model/View Delegates 185Datatype-Specific Editors 186Datatype-Specific Delegates 188Model-Specific Delegates 201 Chapter 6: Model/View Views 207QAbstractItemView Subclasses 208Model-Specific Visualizing Views 224 Chapter 7: Threading with QtConcurrent 245Executing Functions in Threads 248Filtering and Mapping in Threads 261 Chapter 8: Threading with QThread 287Processing Independent Items 287Processing Shared Items 302 Chapter 9: Creating Rich Text Editors 317Introducing QTextDocument 318Creating Custom Text Editors 320A Rich Text Single Line Editor 342Multi-line Rich Text Editing 353 Chapter 10: Creating Rich Text Documents 359Exported QTextDocument File Quality 361Creating QTextDocuments 364Exporting and Printing Documents 371Painting Pages 379 Chapter 11: Creating Graphics/View Windows 389The Graphics/View Architecture 390Graphics/View Widgets and Layouts 392Introducing Graphics Items 399 Chapter 12: Creating Graphics/View Scenes 409Scenes, Items, and Actions 411Enhancing QGraphicsView 439Creating a Dock Widget Toolbox 440Creating Custom Graphics Items 447 Chapter 13: The Animation and State Machine Frameworks 469Introducing the Animation Framework 469Introducing the State Machine Framework 474Combining Animations and State Machines 481 Epilogue 491 Selected Bibliography 495 Index 499
Mark Summerfield owns Qtrac Ltd., where he works as an independent consultant, programmer, author, editor, and trainer specializing in C++, Qt, Python, and PyQt. During nearly three years as documentation manager for Trolltech (now Nokia's Qt Development Frameworks), he founded and edited the Qt Quarterly technical journal. His books include Rapid GUI Programming with Python and Qt (Prentice Hall, 2008) and Programming in Python 3, Second Edition (Addison-Wesley, 2010). With Jasmin Blanchette, he coauthored C++ GUI Programming with Qt 4, Second Edition (Prentice Hall, 2008).
"A good book on advanced Qt programming has been missing in the arsenal of Qt programmers. I'm very happy that Mark has written one. He is a fantastic technicalwriter with all the necessary background to write authoritatively about Qt programming. ... In other words: You are in for a treat! You are holding in your hands an excellent opportunity to expand on your knowledge of all the cool stuff you can do with Qt."
-Eirik Chambe-Eng, cocreator of Qt