I am still very new to Qt and qml and struggle with getting the color of the statusbar and navigationbar changed on deployed andriod apps with qtquick.
I have found that it is possible to change the color of the statusbar via QtAndroid::runOnAndroidThread, but that seems to not work for more recent Qt Versions.
I have found out that this code is probably the one to use now (https://doc-snapshots.qt.io/qt6-dev/qnativeinterface-qandroidapplication.html#runOnAndroidMainThread) :
QAndroidApplication::runOnAndroidMainThread(const std::function<QVariant ()> &runnable, const QDeadlineTimer timeout = QDeadlineTimer::Forever)
with #include .
But unfortunately there aren't any examples I could find on the internet how and where in the code this function is used. And more specifically, how would I use this code to change the color of the status- and navigationbar?
I would really appreciate help here.
Example: showing toast message (running this not in UI-thread will cause exception)