Issue Qt 6.6.1 Qt 6.7.0 beta Windows 10 I wrote a simple example that shows a problem. This example draws a red triangle on the background with (0.2, 0.2, 0.2) color. I implemented the mousePressEvent method. When you click on
Continue readingTag: qt
How can I switch between the front and rear camera on Android in Qt/QML 6.5.2
Issue I use the following code, inside the backFrontCameraClicked() function, I switch between cameras, but nothing happens. The following code communicates with the camera on Android 13, inside videoOutput I have used pinchArea to zoom the camera using 2 fingers.
Continue readingQt 6 Android: Gradle failure to build with built-in JAR error
Issue I’m attempting to build for Android with Qt 6 and Qt Creator. When attempting to build any project, Widgets or Quick, for Android, including example projects, the following build errors occur. ERROR:/hdd/code/build-AndroidWidgets-Android_Qt_6_6_1_aarch64_Clang_arm64_v8a-Debug/android-build/libs/Qt6AndroidNetworkInformationBackend.jar: D8: java.lang.NullPointerException ERROR:/hdd/code/build-AndroidWidgets-Android_Qt_6_6_1_aarch64_Clang_arm64_v8a-Debug/android-build/libs/Qt6Android.jar: D8: java.lang.NullPointerException Running SDK
Continue readingHow to build OpenAL-Soft and set up it in Qt Creator for Android
Issue I didn’t find a step by step guide how to build OpenAL-Soft to use it from Qt for Android. I tried to make it by copying OpenAL-Soft sources into a project. I copied the OpenAL-Soft sources into my example.
Continue readingQt6 Android how to call Toast via JNI?
Issue What am I doing wrong in my function when trying to display this Toast? QNativeInterface::QAndroidApplication::runOnAndroidMainThread([=]() { QJniEnvironment env; jclass clazz = env.findClass("android/widget/Toast"); QJniObject displayText = QJniObject::fromString("Hello world"); jint timeout = 10; QJniObject callableToast = QJniObject::callStaticMethod<jobject>( clazz, "makeText", QNativeInterface::QAndroidApplication::context(), displayText.object<jstring>(),
Continue readingSoundEffect does not play a WAV soundeffect on android
Issue I have recently added support for the sound effects replay in my Qt application and ported it to android platform. For playing my sound file I used a MediaPlayer QML component, which was able to play my effect, but
Continue readingHow can I set extra, custom arguments for androiddeployqt via CMakeLists.txt?
Issue Is it possible to append an argument to the androiddeployqt call via CMakeLists.txt (Qt 6.4+)? Solution Looking at the source code, I think the answer is currently no. At the time of this writing, the latest version of the
Continue readingHow can I set extra, custom arguments for androiddeployqt via CMakeLists.txt?
Issue Is it possible to append an argument to the androiddeployqt call via CMakeLists.txt (Qt 6.4+)? Solution Looking at the source code, I think the answer is currently no. At the time of this writing, the latest version of the
Continue readingQt on Android Runtime error: Invalid package identifier when getting bag for resource number 0x00000000
Issue I am getting this strange error after updating my Qt version from 5.13.1 to 5.14.2 and I am not sure what is the cause of it (I also updated my gradle version from 4.1.0 to 5.5.1). The error give
Continue readingHow can I get the Android IMEI code in Qt?
Issue I have run the following code in the qt program and the jstr value is null. I added the [androidextras] in the .pro file. I added the [READ_PHONE_STATE] Permission in the Androidmanifest.xml. I have run this app on Android
Continue reading