Create mobile apps with Qt Creator
Easy Apps
Find out how to create a cross-platform app with the veteran tool Qt Creator.
Qt has been around for more than 20 years. During this time, developers have used several approaches to develop graphical interfaces. More specifically, you might recall Qt Widgets [1], Qt Quick [2], and Qt Quick Controls 2 [3]. Qt beginners who want to build mobile, cross-platform apps might perhaps be confused by this diversity, especially since all the technologies are still in use.
Qt runs on different platforms: Desktop, embedded, and mobile. For desktop applications (OS X, Windows, Linux), developers are more likely to go for Qt Widgets, which offers native controls for the user interface. In contrast, Qt Quick, based on an OpenGL implementation, seeks to abstract the UI controls to deploy Qt across platforms. Mobile apps developed with Qt Quick do not look native, nor is their performance very convincing. This changed, however, with Qt 5.7, which introduced the lightweight Qt Quick Controls 2. The name is a bit deceptive, because it is not a new version of Qt Quick, but a completely new development.
Mobile Controls
Qt Quick Controls 2 comes with many additional controls and with new containers that simplify development. Navigation elements, now standard in mobile applications, are also on board. Table 1 shows an overview of the elements provided by Qt Quick Controls 2.
Table 1
Qt Quick Controls 2
Containers | Others |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Buttons |
|
|
|
|
|
|
|
|
|
|
|
| Navigation |
Pop-Ups |
|
|
|
|
|
|
|
|
Currently, three styles of control elements are available: Google Material, Windows Universal, and Default – a special iOS style is due to follow. Qt also has a dark and a bright theme.
Producers
If you have worked exclusively with Eclipse for more than 10 years, the switch to Qt Creator [4] might not be easy. However, the software is well-suited to building mobile apps. It helps you program the business logic with C++ and create the interface with QML, thus supporting the deployment process on platforms such as Android, iOS, and Windows 10. Developers can test mobile apps on simulators or real devices from within Qt Creator and build releases for the app stores.
Qt Creator supports the complete Android build process with support for an Android Manifest Editor (Figure 1), signatures, and icons. This also works without Android Studio; however, developers do need to install an SDK and the NDK up front.
An Xcode project for iOS is created by calling Project | Archive and then loading the app into the store, but if you want to use Xcode, you need an Apple computer. The path to the Windows App Store is through a Visual Studio project.
One for All
The beauty of Qt is that it serves different platforms with the same source code, and it even has interfaces to supplement native code for Android and iOS.
For my QtCon Conference App [5], I wanted to find out what is possible with a plain vanilla Qt version. The result is available on GitHub [6], and if you are interested, you will also find it in the Google Play Store or the Apple App Store.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4