How to Get the RSS Feed
As my first subject for this animation blog series, we will be taking a look at Animation curves.
Curves, or better, easing curves, is one of the first concepts we are exposed to when dealing with the subject of animation in the QML space.
What are they?
Well, in simplistic terms, they are a description of an X position over a Time axis that starts in (0 , 0) and ends in (1 , 1). These curves are …
This blog series will introduce the clang-tidy utility from the Clang/LLVM project and show how to use it to automatically refactor…
Functional Safety is the term used for systems designed to minimize risk to human health. But there’s a dilemma in today’s tech-driven world.
We are more reliant than ever on software to control our planes, trains, cars, and boats, to operate our medical equipment, to process our food, to clean our water, and to power our homes. If these systems don’t function properly, they have the ability to injure, or even kill us. Meanwhile software complexity continues to increase exponentially …
Starting with Qt 5.7, we added the ability to create Android services using Qt. In this article we’re going to see how to get started and also how to communicate between the two.
Before we get started I want to add a big bold WARNING about the performance! Because the services are run in the background for a very long time, make sure your service doesn’t drain the device battery!
Step I: Extend QtService
Every single Qt Android …
Some time ago, I wrote a code to restart the running application on Android.
You might well ask why such a thing was needed. It was needed because there are cases where, whenever a user changes the theme, the application has to restart to apply the change (it can’t be applied on the fly). In my example I used it to restart Qt Quick Controls 2 gallery.
Sadly my fix was not accepted, because other platforms (iOS, IIRC) have this …
To get you started on this, we’ll be using KDAB’s Android utils with the humble Toast. Toasts are small popups which are used to show the user some feedback. Check Google’s API guide for more info about toasts.
The easiest way to show a toast is to use Toast.makeText(Context context, CharSequence text, int duration) static method. This method needs 3 params:
- the context (we’ll use the activity)
- the text to show
- and the duration: one of LENGTH_SHORT (0) and
Sometimes we need to exchange images from Android world to Qt world and vice-versa, therefore in this article we’re going to see how to convert a QImage to an Android Bitmap and how to convert an Android bitmap and an Android Drawable into a QImage.
To get access to Android Bitmap data & info we’re going to use NDK’s support, so we need to make sure jnigraphics library is in libraries dependency in our .pro file:
LIBS += -ljnigraphics
Figure 1: Qt Quick Clock …