Posts

Showing posts with the label QML

QML: Emboss effect

Image
QML have some components allowing to draw a shadow over an item. The InnerShadow draw a shadow only in one side of the item, but for have the emboss effect we need to habe both sides with light/dark color. The solution is very simple, use two InnerShadow combined.

QML: CheckBox and RadioButton with description field

Image
Restarting from this post explaining how to add the word wrap feature to the CheckBox and RadioButton controls here will propose to add a description field under the main control text. This will be useful to give a short explanation concerning the use of the control itself.

QML: CheckBox and RadioButton with word wrap feature

Image
Standard QML CheckBox and RadioButton controls can be used in a very easy way but, at least until the current date, it have the problem if the text go over the parent control container is not automatically moved to the next line but is simply cutted out. This missing feature is called word wrap .

QML: Get Android apk package info

Image
All the information stored inside apk AndroidManifest.xml file can be extracted using dedicated Android API. Using JNI through C++ Qt layer is possible to get these info and pass them to the QML level.

QML: Mixed native Android and QML animated splash screen

Image
In this blog two methods for show a splash screen has been proposed. One is based to pure QML code and show animations and the second is native Android way but static. Now a third method mixing both previous solution by allow a partially animated splash screen is proposed.

QML: Change Android screen orientation programmatically

Image
In case your Android app require to dynamically set screen orientation for some particular interface is possible to directly call the system API allowing to choose one of the two standard orientations LANDSCAPE or PORTRAIT.

QML: Show Android native splash screen in your QML app

Image
In this post a solution to make a pure QML splash screen has been proposed and could be used for Android app also. However, since Qt/QML app are "wrapped" inside pure Android code a solution like these could be a little slow especially in the first step of application startup. Here another solution specific for Android app more faster to show splash screen at startup.

QML: Get Android signal strength level

Image
Second post regarding how to get system info from Android to QML. This post will analyze the way to install an Android listener to be advised when phone signal strength level change.

QML: Get Android battery level and status

Image
This post will explain a way to get Android battery level and status from QML. To be more precise will explain the way to install a sort of listener that will automatically advise the QML layer about changes in level of battery charge and the status of the phone (if on charge or not).

QML: Resize controls when Android virtual keyboard come up

Image
QML have currently a bug (current version 5.8 still have) in resize window when android keyboard come up. It happen when virtual keyboard is requested the QML window show a bad flicker by repaint the top control on the center of the screen and back on top again. This look really unprofessional.

QML and Android emulator OpenGL error

Image
Lately, after an Android emulator image update, a strange error regarding OpenGL is coming up using official Android emulator. This error refer to some OpenGL failed operation and, as consequence, doesn't allow the app to run correctly. QML make a large use of OpenGL that's mean each app developed using this technology doesn't work anymore (on the emulator).

QML: Show animated splash screen at startup

Image
QML is a great way to make nice interfaces but, currently, suffer a bit in the initial phase of loading since it could take some time if your QML code is complex or there are many image resources to load. In this case show a splash screen can be a good way to "inform" the user the app is started. More better have an animation will inform also the app is alive and still loading.

QML Snippet: Flickable TextArea and Material style problem

Image
Make a TextArea control flickable is a very easy task using new version 2 of QtQuick controls. However when Material style was applied it show a line on bottom side of control that, in case of full window edit control, is not so good to view.

QML: Manage application state on mobile systems

Image
Develop app for mobile systems like Android or iOS require some additional steps compared to standard Desktop systems. One of the most important is to correctly manage the state change of your app. This is critical for avoid the app to consume CPU and battery when is not required.

Qt on Visual Studio and QML translation files

Image
Develop a Qt application using Visual Studio is possible through the Qt plugin. This plugin manage the basic settings for use Qt libraries inside a VS project. With a limited support is possible to develop QML application but it miss the syntax highlight of QML code and some other features available using Qt Creator.

QML and Android back button

Image
QML and Qt Quick controls allow a very rapid development also mainly for mobile devices. However mobile devices require some additional code for manage special system buttons. In this post we discuss about how to manage the Android back button using QML.