Published:

Some words about a simple experiment with QT

bookmark 1 min read

A while ago I made a skeleton QT application with a data model in C++, a simple QML interface with stacked widgets that the user could navigate and just a few buttons and simple UI components (like a tool-bar). In other words, a simple proof of concept for a mobile application. (I have some ideas about how my dream GTD application will look, and somehow there were some occasional similarities (no - not the styling)...)

Anyway, the aim of the micro-project was not to make anything useful, but to see how much efforts it would take to get it to run under Linux, Windows, macos, Android and iOS.

I wrote the original code under Debian Linux, using "QT Creator" and QT 5.9.1. It took about a few hours (I used some widgets in QML that I have not used before, so reading docs...).

Then I downloaded and installed QT Creator on my Android development VM (Ubuntu), Windows 10 development VM and macos.

The time it took to load the project, figure out the settings for the target, and occasionally downloading more packages (like Android NDK and upgrad xCode) was:

That's pretty impressive! This is the same app, with the same GUI running on all platforms. Of course, for a real application I would use QT Widgets, not QML, for most of the desktop GUI - but the models and business logic would be the same.

*With Android, the fonts was too small, and I had to do some more reading to figure out how to get a sane font size on all platforms (just use the default).

This was fun. I mean, I was really amazed about how easy it has become to make x-platform/mobile apps in C++.

Screendump

This article was originally posted on Linkedin.