O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

An Introduction to Design Patterns in C++ with Qt™, Second Edition

Book Description

Now covers Qt 4.7/4.6

Master C++ “The Qt Way,” with Modern Design Patterns and Efficient Reuse

This fully updated book teaches C++ “The Qt Way,” emphasizing design patterns and efficient reuse. Readers will master both the C++ language and Nokia Qt 4.7/4.6 libraries, as they learn to develop software with well-defined code layers and simple, reusable classes and functions.

Every chapter of this edition has been improved with new content, better organization, or both. Notably, readers will find extensively revised coverage of Widgets, MainWindows, Models and Views, Databases, and Dynamic Forms. This edition introduces the powerful new Qt Creator IDE; presents new multimedia techniques; and offers extended coverage of Qt Designer. It has been restructured to help readers start writing software immediately and write robust, effective software sooner, as well.

The authors introduce several new design patterns, add many quiz questions and labs, and present more efficient solutions relying on new Qt features and best practices. They also provide an up-to-date C++ reference section and a complete application case study.

  • Master C++ keywords, literals, identifiers, declarations, types, and type conversions

  • Understand classes and objects, organize them, and describe their interrelationships

  • Learn consistent programming style and naming rules

  • Use lists, functions, and other essential techniques

  • Define inheritance relationships to share code and promote reuse

  • Learn how code libraries are designed, built, and used

  • Work with QObject, the base class underlying much of Qt

  • Build graphical user interfaces with Qt widgets

  • Use templates to write generic functions and classes

  • Master advanced reflective programming techniques

  • Use the Model-View framework to cleanly separate data and GUI classes

  • Validate input using regular expressions and other techniques

  • Parse XML data with SAX, DOM, and QXmlStreamReader

  • Master today’s most valuable creational and structural design patterns

  • Create, use, monitor, and debug processes and threads

  • Program databases with Qt’s SQL classes

  • Manage memory reliably and efficiently

  • Table of Contents

    1. Title Page
    2. Copyright Page
    3. Contents
    4. Foreword
    5. Preface
    6. Preface to the Second Edition
    7. Acknowledgments
    8. About the Authors
    9. Part I: Design Patterns and Qt
      1. Chapter 1: C++ Introduction
      2. Chapter 2: Top of the class
      3. Chapter 3: Introduction to Qt
      4. Chapter 4: Lists
      5. Chapter 5: Functions
      6. Chapter 6: Inheritance and Polymorphism
      7. Chapter 7: Libraries and Design Patterns
      8. Chapter 8: QObject, QApplication, Signals, and Slots
      9. Chapter 9: Widgets and Designer
      10. Chapter 10: Main Windows and Actions
      11. Chapter 11: Generics and Containers
      12. Chapter 12: Meta Objects, Properties, and Reflective Programming
      13. Chapter 13: Models and Views
      14. Chapter 14: Validation and Regular Expressions
      15. Chapter 15: Parsing XML
      16. Chapter 16: More Design Patterns
      17. Chapter 17: Concurrency
      18. Chapter 18: Database Programming
    10. Part II: C++ Language Reference
      1. Chapter 19: Types and Expressions
      2. Chapter 20: Scope and Storage Class
      3. Chapter 21: Memory Access
      4. Chapter 22: Inheritance in Detail
    11. Part III: Programming Assignments
      1. Chapter 23: MP3 Jukebox Assignments
    12. Appendix A: C++ Reserved Keywords
    13. Appendix B: Standard Headers
    14. Appendix C: Development Tools
    15. Appendix D: Alan’s Quick Start Guide to Debian for Programmers
    16. Appendix E: C++/Qt Setup
    17. Bibliography
    18. Index
    19. Footnotes
      1. Foreword
      2. Preface to the Second Edition
      3. Acknowledgments
      4. Chapter 1
      5. Chapter 2
      6. Chapter 3
      7. Chapter 4
      8. Chapter 5
      9. Chapter 6
      10. Chapter 7
      11. Chapter 8
      12. Chapter 9
      13. Chapter 10
      14. Chapter 11
      15. Chapter 12
      16. Chapter 14
      17. Chapter 15
      18. Chapter 16
      19. Chapter 17
      20. Chapter 18
      21. Chapter 19
      22. Chapter 20
      23. Chapter 21
      24. Chapter 22
      25. Chapter 23
      26. Appendix B
      27. Appendix C
      28. Appendix D
      29. Appendix E
      30. Bibliography