You are previewing Application Development with Qt Creator.
O'Reilly logo
Application Development with Qt Creator

Book Description

A fast-paced guide for building cross-platform applications using QT and QT Quick.

  • Introduces the basic concepts of programming using Qt and the Qt Quick framework, with tips and tricks to help you make the most of Qt Creator

  • Shows you how to write cross-platform mobile applications with Qt Creator

  • Full of illustrations and diagrams, with clear step-by-step instructions and practical examples that will help you build cross-platform applications using Qt and Qt Quick

In Detail

Qt Creator is the leading open-source, cross-platform integrated development environment (IDE) for building GUI applications that run on Windows, Mac OS X, Linux, Android, and many embedded systems. It greatly simplifies cross-platform application development, targeting desktop computers, embedded platforms, and mobile systems. If you want to build and debug applications with Qt Creator in no time, then this book is for you.

This book provides a thorough introduction to using Qt Creator to make cross-platform applications that you can read in just a few hours. It covers everything you need to know to build applications with Qt Creator. This book also discusses the facets of Qt Creator that make it a valued software development environment for students and professionals alike.

The book starts by showing you how to get, install, and use Qt Creator, beginning with the basics of how to edit, compile, debug, and run applications. Along the way, you will learn to use Qt to write cross-platform GUI applications for Mac OS X, Windows, Linux, and Android in C++ and Qt Quick.

This book covers how to craft GUIs with Qt Designer, localize applications using Qt Linguist, and profile application performance with Qt Creator's tools and valgrind. You will gain valuable insight in constructing applications using Qt in C++ and Qt Quick, Qt's declarative GUI authoring platform and learn everything you need to know to use Qt Creator effectively as a software developer.

Table of Contents

  1. Application Development with Qt Creator
    1. Table of Contents
    2. Application Development with Qt Creator
    3. Credits
    4. About the Author
    5. Acknowledgments
    6. About the Reviewers
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Getting Started with Qt Creator
      1. Downloading Qt Creator
      2. Finding your way around Qt Creator
      3. Your first application – Hello World
        1. Hello World using the Qt GUI library
      4. Hello World using Qt Quick
      5. Summary
    10. 2. Building Applications with Qt Creator
      1. Getting started – our sample library
      2. Learning the landscape – the Build menu and .pro files
      3. Linking against our sample library
      4. Getting lost and found again – debugging
        1. Setting breakpoints and stepping through your program
        2. Fine-grained control of breakpoints
        3. Examining variables and memory
        4. Examining the call stack
      5. The Projects pane and building your project
      6. A review – running and debugging your application
      7. Summary
    11. 3. Designing Your Application with Qt Designer
      1. Code interlude – signals and slots
      2. Creating forms in Qt Designer
        1. Creating the main form
        2. Using application resources
      3. Instantiating forms, message boxes, and dialogs in your application
      4. Wiring the Qt GUI application logic
        1. Learning more about Qt GUI widgets
      5. Code interlude – Qt Quick and QML syntax
      6. Creating Qt Quick applications in Qt Designer
        1. Creating a reusable button
        2. The calculator's main view
        3. Learning more about Qt Quick and QML
      7. Summary
    12. 4. Localizing Your Application with Qt Linguist
      1. Understanding the task of localization
      2. Marking strings for localization
      3. Localizing your application with Qt Linguist
      4. Including localized strings in your application
      5. Localizing special things – currencies and dates with QLocale
      6. Summary
    13. 5. Performance Optimization with Qt Creator
      1. The QML performance analyzer
        1. QtSlowButton – a Qt Quick application in need of performance tuning
      2. Finding memory leaks with Valgrind
        1. QtLeakyButton – a Qt C++ application in need of memory help
      3. Summary
    14. 6. Developing Mobile Applications with Qt Creator
      1. A mobile software development primer
        1. User attention is at a premium
        2. Computational resources are at a premium
        3. Network resources are at a premium
        4. Storage resources are at a premium
        5. To port or not to port?
        6. A word on testing
      2. Setting up Qt Creator for Android
        1. Downloading all the pieces
        2. Setting up the environment variables
        3. Finishing the Android SDK installation
        4. Configuring Qt Creator
        5. Building and running your application
      3. Summary
    15. 7. Qt Tips and Tricks
      1. Writing console applications with Qt Creator
      2. Integration with version control systems
      3. Configuring coding style and coding format options
      4. Building from the command line
      5. Setting Qt Quick window display options
      6. Learning more about Qt
      7. Summary
    16. Index