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

Keeping records

In this section, we will look at how we can store and retrieve data in Qt. In particular, we will work out a solution for yet another requirement.

Management has taken a look at what we have done so far with our BigProject, and they like it. Mostly. They did find something to ask about—Where is the old data? When you start the program, there is no history. Why don't we keep the old data so that we can see it? From that, and the conversations that followed, comes a new requirement:

Req. 7: The system shall maintain a history of readings across power cycles.

There are a lot of ways we could store data, but we are here to learn about how to use a database and Qt's database access methods. QSqlDatabase provides a generic interface to several database backends, including MySQL (and MariaDB), SQLite, IBM DB2, PostgreSQL, and generic ODBC (for example...

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 €18.99/month. Cancel anytime