Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Embedded Programming with Qt

You're reading from   Hands-On Embedded Programming with Qt Develop high performance applications for embedded systems with C++ and Qt 5

Arrow left icon
Product type Paperback
Published in Jul 2019
Publisher Packt
ISBN-13 9781789952063
Length 416 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
John Werner John Werner
Author Profile Icon John Werner
John Werner
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Section 1: Getting Started with Embedded Qt FREE CHAPTER
2. Setting Up the Environment 3. Writing Your First Qt Application 4. Running Your First Application on the Target 5. Section 2: Working with Embedded Qt
6. Important Qt Concepts 7. Managing the Overall Workflow 8. Exploring GUI Technologies 9. Adding More Features 10. Section 3: Deep Dive into Embedded Qt
11. Qt in the Embedded World 12. Exploring the IoT with Qt 13. Using More Qt-Related Technologies 14. Section 4: Advanced Techniques and Best Practices
15. Debugging, Logging, and Monitoring Qt Applications 16. Responsive Application Programming - Threads 17. Qt Best Practices 18. Assessments 19. Other Books You May Enjoy Appendix A: BigProject Requirements
1. Appendix B: Bonus Code - Simplifying Q_PROPERTY

Simplifying defining Q_PROPERTY()

This is the simplest of the macros, PROPERTY. It takes a data Type and the Name of the property, then takes care of not only generating the Q_PROPERTY statement, but also the required getter and setter methods:

/**
 * @def PROPERTY(Type, Name)
 *
 * @brief   A macro to define a class "Property" (Q_PROPERTY).
 * @param   Type    - the type of the property
 * @param   Name    - the name of the property
 *
 * This macro defines a Q_PROPERTY, its storage, and the required getter and
 * setter methods.  This allows the property to be accessed by through the
 * QObject or Q_GADGET system.  It also makes importing and exporting the class
 * to XML Streams very easy as the property system does most of the work for you.
 *
 * @note    This can only be used with a class that inherits from QObject or Q_GADGET
 */
#define PROPERTY(Type, Name)  ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime