Android: Move bringChildToFront() call to Android UI thread

Cannot change view hierarchy outside of Android UI thread.

Task-number: QTBUG-116187
Pick-to: 6.7
Change-Id: I05d36a28d16480519a6919047272be9f3cf667d0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
bb10
Tinja Paavoseppä 2024-02-07 11:02:31 +02:00
parent 3dad99a43e
commit 3914a965cc
1 changed files with 7 additions and 5 deletions

View File

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