Posts

Posts mit dem Label "Android" werden angezeigt.

Qt5.4 Beta, QtQuickControls and changing Android theme

Bild
Qt5.4 is coming closer...currently, 5.4 is in the Beta state. So today, I downloaded the Beta for Android on Windows and tried some things out. In a previous post, I showed the new Android-style for the QtQuickControls module. Today, we will look how we could change the theme in a Qt-app on Android. So, changing the theme....a Qt guru may think this will work with the QPalette class. With QPalette, you can define the background color, text color, ... in a platform-independent way. But QPalette won't be a good choice for Android... On Android, we're facing a different, but very famous problem: the "Android fragmentation". Qt is supporting a minimum Android SDK version 10, current SDK version is 21 a.k.a. "Lollipop". (by the way: QtQuickControls style for Android is working for SDK version 11+) During the SDK version, the style of the native controls changed a lot! So, "native look-and-feel" on SDK v10 is very different than "native look...

QtQuickControls style for Android in Qt5.4 - First touch

Bild
With the upcoming release of Qt5.4 in October, developers have now the chance to use QML components with Android-native look-and-feel. As the QWidget-module have an Android style a long time ago, QML and its QtQuickControls-module will follow now! I compiled the pre-Alpha state of Qt5.4 and take a look at the Android style. So, I compiled these modules for android: qtbase qtdeclarative qtquickcontrols Try it on your own or wait until the Beta release of Qt5.4 (sheduled to 4th September 2014), which will ship out binary installers (no compiling work for you!). Then, create a simple QtQuick/QML app, which includes some control elements like Button, Slider, Menu, etc. Alternative, you can clone J-P Nurmis's git repo "catalog" (https://github.com/jpnurmi/catalog), a small example app which show every control element. (By the way, J-P Nurmi created the Android style....thanks!) Hereare two screenshots of my "helloandroid" app on my Amazon Fire HD:...