Application Development with Qt Creator - Second Edition

Book description

Design and build dazzling cross-platform applications using Qt and Qt Quick

In Detail

Qt Creator is a cross-platform C++ IDE (Integrated Development Environment) that is part of the Qt project. It is used for building GUI applications that run on Windows, Mac OS X, Linux, Android, and many embedded systems. It includes a visual debugger and a forms designer within an integrated GUI.

Application Development with Qt Creator Second Edition, covers everything you need to know to build cross-platform applications with Qt Creator. It 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 how to use Qt to write cross-platform GUI applications for Mac OS X, Windows, Linux, and Android in C++ and Qt Quick.

You will become proficient with the facets of Qt Creator that make it a valued software development environment for students and professionals alike.

What You Will Learn

  • Use Qt Creator's editor to edit your application source and resource files
  • Explore the core functions of Qt Creator
  • Compile and debug your Qt Quick and C++ applications using Qt Creator
  • Localize applications using Qt Linguist and Qt
  • Build GUI applications using both Qt and Qt Quick
  • Write mobile applications for Android using Qt Creator and Qt Quick
  • Integrate version control with Qt Creator
  • Analyze your application's runtime performance with Qt Creator

Table of contents

  1. Application Development with Qt Creator Second Edition
    1. Table of Contents
    2. Application Development with Qt Creator Second Edition
    3. Credits
    4. About the Author
    5. About the Reviewers
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. 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
    8. 1. Getting Started with Qt Creator
      1. Downloading Qt and Qt Creator
      2. Finding your way around Qt Creator
      3. Your first application – Hello World
      4. Hello World using the QtGui library
      5. Hello World using Qt Quick
      6. Summary
    9. 2. Building Applications with Qt Creator
      1. Getting started – our sample library
      2. Learning the landscape – the Build menu and the .pro files
      3. Linking against our sample library
      4. Getting lost and found again – debugging
        1. Setting breakpoints and stepping through your program
        2. Examining variables and memory
        3. Examining the call stack
      5. The Projects pane and building your project
      6. A review – running and debugging your application
      7. Summary
    10. 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 Widgets' application logic
        1. Learning more about Qt Widgets
      5. Code interlude – Qt Quick and the 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
    11. 4. Qt Foundations
      1. Representing data using Qt's core classes
        1. Working with key-value pairs
      2. Multithreading in Qt
      3. Accessing files using Qt
      4. Accessing HTTP resources using Qt
        1. Performing HTTP requests
      5. Parsing XML using Qt
        1. Using XML parsing with HTTP
        2. Implementing WorkerThread
      6. Summary
    12. 5. Developing Applications with Qt Widgets
      1. Your main application and its menus
      2. Simple Qt Widgets
      3. Managing the widget layout with layouts
      4. Model-view-controller programming with Qt
        1. Analyzing a concrete model subclass
      5. Rendering web content with QWebView
      6. Summary
    13. 6. Drawing with Qt
      1. What we need to start drawing with Qt
      2. Drawing with QPainter on QPaintDevice instances
      3. Drawing off screen
      4. Creating custom widgets
      5. The Graphics View Framework
      6. Summary
    14. 7. Doing More with Qt Quick
      1. The fundamental concepts of Qt Quick
      2. States and transitions in Qt Quick
      3. Integrating Qt Quick and C++
      4. Putting it all together – an image gallery application
      5. Summary
    15. 8. Multimedia and Qt Quick
      1. Multimedia in Qt
      2. Playing audio clips and sound effects
      3. Playing video clips
      4. Accessing the camera
      5. Summary
    16. 9. Sensors and Qt Quick
      1. Sensors in Qt
      2. Determining the device location
      3. Obtaining a device's position – a simple example
      4. Summary
    17. 10. Localizing Your Application with Qt Linguist
      1. Understanding the task of localization
      2. Marking strings for localization
      3. Localizing your application with QLinguist
      4. Including localized strings in your application
      5. Localizing special parameters – currencies and dates with QLocale
      6. Summary
    18. 11. Optimizing Performance 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
    19. 12. 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 environment variables
        3. Finishing the Android SDK installation
        4. Configuring Qt Creator
        5. Building and running your application
      3. Supporting other mobile platforms
      4. Summary
    20. 13. Qt Tips and Tricks
      1. Writing console applications with Qt Creator
      2. Integrating Qt Creator with version control systems
      3. Configuring the coding style and coding format options
      4. Building projects from the command line
      5. Setting the Qt Quick window display options
      6. Learning more about Qt
      7. Debugging Qt's signal-slot connections
      8. Summary
    21. Index

Product information

  • Title: Application Development with Qt Creator - Second Edition
  • Author(s): Ray Rischpater
  • Release date: November 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781784398675