I ran into a problem. I want to change the color of the status bar in the qt application for Android, but with the release of qt6 all working methods have sunk into oblivion, does anyone know how to do this now?
I tried to do this through AndroidManifest and the created res/value/style, it did not give an error, but the color did not change. I also skipped the following code in the main file, hoping that I would at least hide it, and the icons disappeared but there was a black bar behind them:
QNativeInterface::QAndroidApplication::runOnAndroidMainThread([]() {
QJniObject activity = QNativeInterface::QAndroidApplication::context();
// Hide system ui elements or go full screen
activity.callObjectMethod("getWindow", "()Landroid/view/Window;")
.callObjectMethod("getDecorView", "()Landroid/view/View;")
.callMethod<void>("setSystemUiVisibility", "(I)V", 0xff00ff);
}).waitForFinished();