diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-06 08:38:11 +0200 |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-06 09:18:48 +0200 |
commit | 55c4f15df0d482c7d3d6c889b9fc132ed0bdd12a (patch) | |
tree | 99c01d7a4e0941f415e9a48f51faac94787b6cb0 /tests/auto/qmenu | |
parent | 57ceb11ecf95032418712a686418116cf2398e7a (diff) | |
parent | b008dfbd67176948f6fdf830dc99d23a538a6b9c (diff) | |
download | qt4-tools-55c4f15df0d482c7d3d6c889b9fc132ed0bdd12a.tar.gz |
Merge commit 'qt/master-stable'
Conflicts:
configure.exe
doc/src/classes/qnamespace.qdoc
examples/examples.pro
src/corelib/kernel/qcoreevent.cpp
src/corelib/kernel/qobject.cpp
src/gui/kernel/qapplication.cpp
src/gui/kernel/qstandardgestures.h
src/gui/kernel/qwidget.cpp
Diffstat (limited to 'tests/auto/qmenu')
-rw-r--r-- | tests/auto/qmenu/tst_qmenu.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 70174e3e3c..4945d11cae 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -96,6 +96,7 @@ private slots: void task256918_setFont(); void menuSizeHint(); void task258920_mouseBorder(); + void setFixedWidth(); protected slots: void onActivated(QAction*); void onHighlighted(QAction*); @@ -805,6 +806,17 @@ void tst_QMenu::task258920_mouseBorder() QVERIFY(menu.painted); } +void tst_QMenu::setFixedWidth() +{ + QMenu menu; + menu.addAction("action"); + menu.setFixedWidth(300); + //the sizehint should reflect the minimumwidth because the action will try to + //get as much space as possible + QCOMPARE(menu.sizeHint().width(), menu.minimumWidth()); +} + + QTEST_MAIN(tst_QMenu) #include "tst_qmenu.moc" |