Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
Deploy local Qt libraries Problem!
I have a problem by running QT application with necessitas on android device. Everything is working fine but I cannot make
permanent application with local Qt libraries.
The main view of tabs, buttons and textboxes looks fine when application is run by using deployment.
(For example, TAB widget looks normal like in windows).
Problem appears when I try to run application directly on android device (not using deployment) simple by clicking on application. Application can run and works fine, but main view of buttons, textboxes and tabs looks different. Some background colors differ, fonts also difers and some objects disappeared (or example groupboxes), buttons gets different color. It seems that application does not using previously deployed local Qt libraries.
What need to be configured that application can be run normally like with deployment?
Based on this presentation http://www.youtube.com/watch?v=Fq4fkOSVGhY use Ministro and do not use local Qt libraries. Do you really need to use local libraries? Maybe you have installed some apps that use Ministro (e.g. sample apps) and your app chooses them over your locally deployed libraries - while I think that should end up with crash not with behaviour you see (while everything is possible, e.g. if correct libraries are used but different resources are loaded).
I have not used Qt widgets on Android so I'm speculating a little bit.
Actually I see no reason do not use local Qt libraries if it works. Qt Creator has plenty of widgets, so why do not use it? The only problem is that they visually appears different when I am using Qt libraries from device.
I do not have a lot experience with QT but seems that there is only problem in project configuration.
See picture: http://i49.tinypic.com/1zlxag7.jpg
In let you can see visual appearance when using Deploy Gt libs
In right without. Without Qt libs background is black, but if I set background color there can be seen others objects problems.
Qt has widgets - I think that has nothing to do with Qt Creator. Ministro in my opinion is better option IMHO.
Visual difference seems to be theme issue (http://doc.qt.digia.com/qt/gallery.html). I don't know however how theme is set in your situation. My guess is that you have default theme and default is different for deployed and local libraries. If you could figure out a way to set specific theme then there shouldn't be any difference between libraries.
I'm just guessing here so if I'm wrong let's wait for exact answer from somebody else.
I will check themes.
Actually I figure out that if I run application on android by using QT Ctr+R then program starts with normal colors and button. But starting application from android (by tapping on screen) runs not normal.
Change of theme has no effect.. Still running application independent I am getting black window with buttons inside.
By changing palette is possible to make window other color, but problem with checkbox color appears, they are not visible..
What to do? help? :(
You could try asking someone directly who created Qt widgets app for Android. E.g. try contacting this guy: http://suchakra.wordpress.com/2011/11/20/qt-apps-on-android-part-two-an-apple-a-day/
If you will figure out solution - please share it here.
While I would strongly recommend learning QML.
Thanks for replay..
Ok! I figured out, that running application from QtCreator it runs without necessitas (wich is availabe on gogglePlay). But when running application by its self it requires Necessitas and if it is installed visual view of program are different than run with QtCreator.
There somehow need to incorporated QtLibs with app. I've found line:
I tired to modify libs.xml like:
<?xml version='1.0' encoding='utf-8'?>
But error appears:
Packaging Error: Command 'D:\necessitas/android-sdk/platform-tools/adb.exe -s C4F1240141D229E install F:/Necessitas_work/Carbide3/android/bin/Carbide3-debug.apk' failed.Exit code: 1 Error while building/deploying project Test3 (target: Necessitas Qt 4.8.2 for Android armv5)
Problem solved in QtActivity.java file :)
After digging a little deeper I found that, need to change native style value instead of 1 to 0:
private static final String ENVIRONMENT_VARIABLES="QT_USE_ANDROID_NATIVE_STYLE=1\\t";
private static final String ENVIRONMENT_VARIABLES="QT_USE_ANDROID_NATIVE_STYLE=0\\t";
There is file in QT project: