I found a global solution for it (resp. ChatGPT :-) and will share it here.
class AndroidApplication : public QApplication
{
public:
AndroidApplication(int &argc, char **argv)
: QApplication(argc, argv)
{}
bool notify(QObject *receiver, QEvent *e) override
{
// Erstmal normal weiterleiten
bool ok = QApplication::notify(receiver, e);
// Bei jedem UpdateRequest-Event erzwingen wir einen Frame-Swap
if (e->type() == QEvent::UpdateRequest) {
// Prüfen, ob das Ziel ein QWidget ist
if (auto w = qobject_cast<QWidget*>(receiver)) {
if (auto wh = w->window()->windowHandle()) {
wh->requestUpdate(); // sofortigen Flush anstoßen
}
}
}
return ok;
}
};
It works ! Is this ok in general and for performance issues ?