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
Cross-Platform Development with Qt 6 and Modern C++

You're reading from   Cross-Platform Development with Qt 6 and Modern C++ Design and build applications with modern graphical user interfaces without worrying about platform dependency

Arrow left icon
Product type Paperback
Published in Jun 2021
Publisher Packt
ISBN-13 9781800204584
Length 442 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Nibedit Dey Nibedit Dey
Author Profile Icon Nibedit Dey
Nibedit Dey
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Section 1: The Basics
2. Chapter 1: Introduction to Qt 6 FREE CHAPTER 3. Chapter 2: Introduction to Qt Creator 4. Chapter 3: GUI Design Using Qt Widgets 5. Chapter 4: Qt Quick and QML 6. Section 2: Cross-Platform Development
7. Chapter 5: Cross-Platform Development 8. Section 3: Advanced Programming, Debugging, and Deployment
9. Chapter 6: Signals and Slots 10. Chapter 7: Model View Programming 11. Chapter 8: Graphics and Animations 12. Chapter 9: Testing and Debugging 13. Chapter 10: Deploying Qt Applications 14. Chapter 11: Internationalization 15. Chapter 12: Performance Considerations 16. Other Books You May Enjoy

Debugging a Qt Quick application

In the last section, we discussed how to debug your C++ code. But you are probably still wondering how to debug code written in QML. Qt also has a provision to debug your QML code. When you are developing a Qt Quick application, there are a lot of options to troubleshoot issues. In this section, we will discuss various debugging techniques related to QML and how to use them.

Just like the QDebug class, there are different console APIs that are available for debugging in QML. They are as follows:

  • Log: This is used to print general messages.
  • Assert: This is used to verify an expression.
  • Timer: This is used to measure the time spent between calls.
  • Trace: This is used to print a stack trace of a JavaScript execution.
  • Count: This is used to find the number of calls made to a function.
  • Profile: This is used to profile QML and JavaScript code.
  • Exception: It is used to print error messages.

The Console API provides...

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