summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 9dc18e0..3559b15 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -104,6 +104,7 @@ private slots:
void setFixedWidth();
void deleteActionInTriggered();
void pushButtonPopulateOnAboutToShow();
+ void QTBUG7907_submenus_autoselect();
protected slots:
void onActivated(QAction*);
void onHighlighted(QAction*);
@@ -930,6 +931,22 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow()
QVERIFY(!lastMenu->geometry().intersects(b.geometry()));
}
+void tst_QMenu::QTBUG7907_submenus_autoselect()
+{
+ QMenu menu("Test Menu");
+ QMenu set1("Setting1");
+ QMenu set2("Setting2");
+ QMenu subset("Subsetting");
+ subset.addAction("Values");
+ set1.addMenu(&subset);
+ menu.addMenu(&set1);
+ menu.addMenu(&set2);
+ menu.show();
+ QTest::qWaitForWindowShown(&menu);
+ QTest::mouseClick(&menu, Qt::LeftButton, Qt::NoModifier, QPoint(5,5) );
+ QTest::qWait(500);
+ QVERIFY(!subset.isVisible());
+}
QTEST_MAIN(tst_QMenu)