Solved Qml with c++ backend freezes on android
-
Hi everyone
I have written a simple code that the user inputs a number in a label and the c++ backend receives it and does some calculation and send it back to the UI. It works well without any problem but if call the c++ functions and then minimize the app and want to maximize it again it freezes, If I don't call any c++ functions it won't freeze, does anyone know the problem?
-
do you happen to have the input keyboard open when you minimize the app?
currently there's a bug in 5.12 that causes the ui freeze when you minimize the app with virtual keyboard open.
-
@J.Hilk Yes I have a keyboard but even if I close the keyboard it still freezes. So you mean the problem is not from c++? I thought may be it is possible to use c++ as the backend.
-
@J.Hilk Is there any solution or should I switch to another language for android?
-
@PouryaTorabi
what I meant was this bug
https://bugreports.qt.io/browse/QTBUG-72101Seems to be fixed in the newest versions of Qt
-
@J.Hilk This is the kit I use, so I shouldn't have problem.
-
@PouryaTorabi said in Qml with c++ backend freezes on android:
@J.Hilk This is the kit I use, so I shouldn't have problem.
actually no,
you're using5.12.0
the fixed versions are:5.12.1, 5.14.0 Alpha
-
I had a hard time configuring the kit. Is there any easy way to update to qt5.12.1 or I have to download and install the qt5.12.1?
-
@PouryaTorabi
if you simply download the 5.12.1 (via maintenance tool) QtCreator should automatically select the settings from your 5.12.0 kit and apply them to the 5.12.1 one -
After a lot of struggling I had to download and install qt 5.12.1 which also installed Qt creator 4.8.1, I also had to change the ndk version, it didn't work with the ndk r14 so I used ndk r19, then built the project again and the bug was solved.
There were no update for qt5.12.1 in the maintenance tool.
Thanks for your help @J-Hilk . -
This is a year old, sorry to bring it back up...
I have an existing app that had been running perfectly on all Android OSes up until the Android 9 release..then the app started to have "freezes" issues. Nothing changed in the app which was built using qt5.8.1, so the freeze is obviously related to changes in the Android OS.
So I'm going to recompile the app to "fix" the "freeze" issue.
Does the Freeze Fix only exist in qt5.12.1 or is it in all Qt versions greater than qt5.12.1 ?
Specifically is it in qt5.12.7 ?
-
@PSI_lbc If the fix is in 5.12.1 then it will be in all newer versions as well