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:
parent
93aa5ceeff
commit
64caa7c4b3
@ -178,11 +178,13 @@ public class QtWindow extends QtLayout implements QtSurfaceInterface {
|
|||||||
|
|
||||||
public void bringChildToFront(int id)
|
public void bringChildToFront(int id)
|
||||||
{
|
{
|
||||||
|
QtNative.runAction(()-> {
|
||||||
View view = m_childWindows.get(id);
|
View view = m_childWindows.get(id);
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
if (getChildCount() > 0)
|
if (getChildCount() > 0)
|
||||||
moveChild(view, getChildCount() - 1);
|
moveChild(view, getChildCount() - 1);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bringChildToBack(int id) {
|
public void bringChildToBack(int id) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user