Android: Move bringChildToFront() call to Android UI thread

Cannot change view hierarchy outside of Android UI thread.

Task-number: QTBUG-116187
Change-Id: I05d36a28d16480519a6919047272be9f3cf667d0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 3914a965ccc1b1f8a2b5828b480cd760cf923779)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tinja Paavoseppä 2024-02-07 11:02:31 +02:00 committed by Qt Cherry-pick Bot
parent 93aa5ceeff
commit 64caa7c4b3

View File

@ -178,11 +178,13 @@ public class QtWindow extends QtLayout implements QtSurfaceInterface {
public void bringChildToFront(int id)
{
QtNative.runAction(()-> {
View view = m_childWindows.get(id);
if (view != null) {
if (getChildCount() > 0)
moveChild(view, getChildCount() - 1);
}
});
}
public void bringChildToBack(int id) {