Book Image

Hands-On Mobile and Embedded Development with Qt 5

By : Lorn Potter
Book Image

Hands-On Mobile and Embedded Development with Qt 5

By: Lorn Potter

Overview of this book

Qt is a world-class framework, helping you to develop rich graphical user interfaces (GUIs) and multi-platform applications that run on all major desktop platforms and most mobile or embedded platforms. The framework helps you connect the dots across platforms and between online and physical experience. This book will help you leverage the fully-featured Qt framework and its modular cross-platform library classes and intuitive APIs to develop applications for mobile, IoT, and industrial embedded systems. Considerations such as screen size, device orientation changes, and small memory will be discussed. We will focus on various core aspects of embedded and mobile systems, such as connectivity, networking, and sensors; there is no IoT without sensors. You will learn how to quickly design a flexible, fast, and responsive UI that looks great. Going further, you will implement different elements in a matter of minutes and synchronize the UI elements with the 3D assets with high precision. You will learn how to create high-performance embedded systems with 3D/2D user interfaces, and deploy and test on your target hardware. The book will explore several new features, including Qt for WebAssembly. At the end of this book, you will learn about creating a full software stack for embedded Linux systems using Yocto and Boot to Qt for Device Creation.
Table of Contents (23 chapters)
Title Page
Dedication
About Packt
Foreword
Contributors
Preface
Index

Building with Qt Creator


It is possible to use Qt Creator to build and run your Qt app once you have compiled Qt itself from the command line.

The Build environment

In Qt Creator, navigate to Tools | Options... | Kits

Then go to theCompilers tab. You need to add emcc as a C compiler, and em++ as a C++ compiler, so click on the Add button and select Custom from the drop-down list.

First select C and add the following details: 

  • Name: emcc (1.38.16)
  • Compiler path/home/user/emsdk/emscripten/1.38.16/emcc
  • Make path: /usr/bin/make
  • ABI: x86 linux unknown elf 64bit
  • Qt mkspecs: wasm-emscripten

Select C++ and add the following details:

  • Name: emc++(1.38.16)
  • Compiler path/home/user/emsdk/emscripten/1.38.16/em++
  • Make path: /usr/bin/make
  • ABI: x86 linux unknown elf 64bit
  • Qt mkspecs: wasm-emscripten

Click Apply.

Go to the tab labeled Qt Versions and click on the Add button. Navigate to where you build Qt for WebAssembly, and, in the bin directory, select the qmake. Click Apply.

 

Go to the tab labeled Kits, and click on...