Patch Qt 5.8.0 for QTBUG-59026

February 28, 2017 — Leave a comment

First thing I’m doing to test if a new Qt Version is installed correct and to see the new controls from QtQuickControls2 is to start the Gallery Example.

Tested on OSX and iOS without any problems, but on Android 6.0.1 Device trying to open the Delegates or RadioButton Pages this doesn’t work with an error:

QQmlApplicationEngine failed to load component ... Type RadioButton unavailable

Looking at JIRA I found this reprted bug: https://bugreports.qt.io/browse/QTBUG-59026

Bug was already fixed by J-P Nurmi 🙂

patch_radio

 

Unfortunately the fix is done for 5.8.1 and 5.9.0 Beta. From Qt Blog I was aware that there will be no 5.8.1 this time to focus work on 5.9.

So this was a show-stopper for me.

Qt is Open Source – so it’s no problem to get the changes.

From the bug you can get the info of the affected component (qt/qtquickcontrols2) and the branch (5.8.1) where it was fixed.

Scrolling down the page you’ll also find the commit e91c9feab8a0cf4cff71cc68ab0f001b1531504f

patch_radio2

 

Now it’s easy to patch.

Hint: we only must do this for the Android kit

Open a Terminal and do this to patch for your Android Kit.

Create a directory you want to clone the repo to.

export ANDROID_NDK_ROOT=/your_path_to/android-ndk-r10e
cd /your-path-to-store-cloned-repo_android
git clone --branch 5.8 git://code.qt.io/qt/qtquickcontrols2.git
cd qtquickcontrols2
git checkout -b radiobutton v5.8.0
git cherry-pick e91c9feab8a0cf4cff71cc68ab0f001b1531504f
/your-path-where-qt-is-installed/5.8/android_armv7/bin/qmake
make
make install

the cherry-pick will print some infos so you’re sure that it’s the right commit:

[radiobutton 46a936f] Add missing QML type registrations
 Author: J-P Nurmi <jpnurmi@qt.io>
 Date: Mon Feb 20 15:34:26 2017 +0100
 2 files changed, 2 insertions(+)

Now the RadioButtons are working again on Android 6 and Qt 5.8 🙂

screenshot_20170228-172253

thanks @jpnurmi helping me to make this work.


← Back (Install Qt 5.8)

→ Next Article (Patch BUG 59293)

⇐ Home (Overview / Topics)


No Comments

Be the first to start the conversation!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s