Daily Archives: 30.01.2018

Link
nymea1

Here at guh GmbH, the creators of the IoT platform nymea, we have been using Qt since right from the start. You may think: it seems an odd choice to use Qt for a device with no UI requirements but just middleware components basically invisible to the user. Let me explain why this definitely isn’t the case. Essentially, there are tree misconceptions in the previous statement.

UI Framework: Yes, but so Much More

The first and biggest misconception is that Qt only focuses on UI projects. It is true that Qt started as a UI toolkit many, many years ago. But since then, Qt has evolved into a fully featured set of libraries and tools supporting the developer in every layer of the stack. Even if you don’t need graphical bells and whistles, Qt will increase your productivity by an order of magnitude. I’ll go a bit more in depth later on.

UI has Many Faces

Now, let me address the second misconception in the above statement: that no display equals no UI. Even when you’re building an embedded device without display, there’s hardly no user interface for it. In our example the user interface consists of a web interface running on the IoT box and a client app. The client application, running on mobile phones, PCs or just wall-mounted displays is mostly a thin UI layer, talking to the device. Here, Qt Quick can deliver a smooth, modern experience with a “write once, run everywhere” application. And the coolest part: since Qt 5.10, this very same client application can be re-used as the web interface on the device deploying the new Qt WebGL features.

No More Overhead: Deploy Only What You Need

Another comment I’ve often heard is that importing Qt into an embedded device would be a huge overhead. While in the early days, Qt was built of some few, rather big modules, this has changed a long time ago. At the very latest with Qt5, the modularization of Qt has facilitated fine-grained control of what parts of Qt are needed for a small footprint installation. However, in recent days this has been taken even further, and with Qt for devices it is now possible to strip down the required components to the real bare minimum, invalidating this point completely.

nymea3

How Qt has Increased Our Productivity Building nymea:

As mentioned above, I’d also like to address some of the features …read more

Source:: http://blog.qt.io/blog/2018/01/30/boost-your-iot-device-with-qt/

      

Link
How to Make a Qt app

Application Development with QML is simple and powerful. But Qt C++ can be more performant, offers many features and is less error-prone. This post shows you how to create apps that take advantage of both languages.

How to Communicate between C++ and QML

It is important to choose the right language for different features of your app. Integrate C++ components with QML to take your mobile app development to the next level.

Advantages of Coding in QML

V-Play Engine for Qt-based mobile apps and games uses the power of Qt Quick (QML + Javascript). This declarative scripting language is so powerful that it saves up to 60% lines of code compared to other programming languages.

Coding in QML has several advantages over development with C++:

  • Coding with QML + JavaScript is very easy to learn and allows to reduce the required amount of code a lot.
  • Language concepts like states, signals or property bindings are a huge time-saver.
  • QML makes adding animations simple. You can animate every property of your QML types with simple Animation components.
  • QML is extensible and flexible. For example, you can extend objects with new properties and features in-line. No need to create a new re-usable type for small extensions.
  • The QML Rendering Engine offers a great performance. The renderer uses C++ Qt and relies on a hardware accelerated scene graph. This makes it fast enough to power even high-performance games.

When to use C++ Instead

Qt app development with C++ has advantages as well. For some scenarios you need features that are only available with Qt C++. Also, C++ is fast and type-safe. This allows to provide the best possible performance for long-running and data-intense calculations.

For these examples, you would choose C++ over QML: