From e2790a6758be18add2bcab42cc7dfebdd74daae1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 1 Apr 2025 08:33:54 +0200 Subject: [PATCH] tst_QComboBox: fix popupPositionAfterStyleChange() FAIL on Kubuntu 20.04 On my machine, the window manager opened the QComboBox always at y = 0 (top edge of the screen), where the popup, being confined to the screen geometry, had no chance of "open[ing] up centered on top of the current index". Fix by centering the widget on screen. Amends 8393922e7071221a9c6c0811eb714f20bf4ed02b. Pick-to: 6.9 6.8 6.5 Change-Id: I7b4d066aa1e555f3d5cc1d5e0c88b1d835bf2b26 Reviewed-by: Axel Spoerl --- tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 2c9b5e1dc47..cb83bd38cb5 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -3490,6 +3490,7 @@ void tst_QComboBox::popupPositionAfterStyleChange() QSKIP("Flaky on QEMU, QTBUG-114760"); box.addItems({"first", "middle", "last"}); + centerOnScreen(&box); box.show(); QVERIFY(QTest::qWaitForWindowExposed(&box)); box.showPopup();