@SGaist Yes running the unit test binary with -qws..As we need to do mock c libraries as well, ui unit tests are run within CPPUTEST framework and use QTEST library to execute Qt specific functionality like QSignalSpy. Any suggestion/hint if it could throw any memory leak incase widget->show() is being called on target with -qws or any known issue in Qt bug tracker in Qt 4.8?
@SGaist said in UIApplication.shared.canOpenURL implements in Qt:
NSURL *url = myUrl.toNSUrl();
bool canOpen = [[UIApplication shared] canOpenUrl: url];
Thank you so much for your message.
Also how we can access to shared object when we are in another file?
It's a globally object in OBJECT C (.mm) files?
AFAIK, you can't directly because there's no python interpreter on these platform.
You might want to look at BeeWare that seems to provide tools to translate python applications to a native binary. I have not used it, just discovered it.
If you currently want to go the simple way, you should consider moving to C++ has all the platform you want to target are already supported.
Here is my solution:
I have created a new app from the template of Qt Creator and compared it with the example project for Qt Android:
I conclude, that I have to modify the .pro file. First of all I had to add the following line:
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
Then I had to replace DISTFILES, that is automatically added by Qt Creator, if I create a Java class:
OTHER_FILES += \
Finally I had to edit the AndroidManifest.xml, that I have copied from the exmaple project, in the text editor mode:
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:name="com.hello.android.Backend" android:label="Hello Android" android:screenOrientation="unspecified">
The last step was not necessary in the project of my initial question.
I found a workaround by myself. Actually the problem lies in the multilanguage feature, which needs some Qt tools for configuring it correctly with cmake. One Workaround is just install one binary of Qt 5.14.0 e.g. msvc2017 32 bit and assigne CMAKE_PREFIX_PATH to the location where the missing cmake file is located e.g. CMAKE_PREFIX_PATH:INTERNAL=C:\Qt\5.14.0\msvc2017\lib\cmake\Qt5. After that, cmake is then running to the end giving some warnings, but this can be ignored and all demos can be build and flashed on the target board.
@daljit97 I've a similar problem here. In my case, the qmake generated android-*-deployment-settings.json contains the wrong path for qmake_qmake_qm_files.qrc.
I experienced the same issue. I solved it by re-running "./sysroot-relativelinks.py sysroot". I caused it by changing some of my paths after calling "./sysroot-relativelinks.py sysroot".
Hope this helps.
@nataliejohn said in android specified library:
Open the module-level build.gradle file.
Delete the line for the applicationId. Only an Android app module can define this.
Thanks for the great feedback.
@Ramakanth said in Qt4.8 memory leak in QLineEdit::setReadOnly(true):
Any suggestions on how to fix the same as it causes segmentation fault on target?
I don't think that this will cause a segfault - it's allocated once at application startup but not released during destruction which is not good but also not a big deal.
Looks like by this blog that qt just isn't producing the correct android_deployment_settings.json
Might have to do it manually for now.
@JoeBot said in Cross compile Qt 5.12.5 for raspberry pi 4:
Can you please provide a link to the tutorial regarding the substitution of " -lEGL and -LGLESv2
I guess he followed this tutorial, pay attention to step #6.
qmake -project generates a .pro file but it does not do deep inspection so you have to check its content and add the parts that it does not know about. For example the modules that you are going to use beside the defaults.
@Nando As far as I know, Apple recently marked a couple of API's as private. and Qt's WebView is using some of those.
A rather random move from Apple, but it happens. AFAIK no workaround as of jet, but as @SGaist said, bring this the the mailing list, there people should be able to help/inform you more