Book Image

QT5 Blueprints

By : Symeon Huang
Book Image

QT5 Blueprints

By: Symeon Huang

Overview of this book

Table of Contents (17 chapters)
Qt 5 Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Debugging Qt Quick applications


We will use the Weather_QML project from Chapter 7, Parsing JSON and XML Documents to Use Online APIs, as a demonstration program to show how to debug a Qt Quick application.

First, we need to ensure that QML debugging is enabled. Open the Weather_QML project in Qt Creator. Then, perform the following steps:

  1. Switch to the Projects mode.

  2. Expand the qmake step in Build Steps.

  3. Check Enable QML debugging if it's not checked.

    Tip

    Debugging QML will open a socket at a well-known port, which poses a security risk. Anyone on your network could connect to the debugging application and execute any JavaScript function. Therefore, you have to make sure there are appropriate firewall rules.

The same procedure is used to start QML debugging, which is to navigate to Debug | Start Debugging | Start Debugging, or click the Debug button, or just press F5. It may trigger a Windows Security Alert, shown in the following screenshot. Don't forget to click on the Allow access button.

Once...