diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-05 05:24:23 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-05 05:24:23 (GMT) |
commit | 9f43d4aafeb16c81bc1a161c99dee2df19772e42 (patch) | |
tree | 081f5c2323f6fadf49f2d1fada8a7c0cb4bc953c /tests/auto/qstyle | |
parent | f14e3b86e6b7b496017ddd462821325bdb40c779 (diff) | |
parent | 7474ad656269aec1352d166bb5a4435086d48482 (diff) | |
download | Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.zip Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.gz Qt-9f43d4aafeb16c81bc1a161c99dee2df19772e42.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/qstyle')
-rw-r--r-- | tests/auto/qstyle/tst_qstyle.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index 51fde74..a76c82d 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -52,6 +52,7 @@ #include <qstyleoption.h> #include <qscrollbar.h> #include <qprogressbar.h> +#include <qtoolbutton.h> #include <qplastiquestyle.h> #include <qwindowsstyle.h> @@ -445,6 +446,8 @@ void tst_QStyle::testWindowsVistaStyle() if (QSysInfo::WindowsVersion == QSysInfo::WV_VISTA) testPainting(&vistastyle, "vista"); + else if (QSysInfo::WindowsVersion == QSysInfo::WV_XP) + testPainting(&vistastyle, "xp"); #endif } @@ -460,6 +463,7 @@ void comparePixmap(const QString &filename, const QPixmap &pixmap) void tst_QStyle::testPainting(QStyle *style, const QString &platform) { +qDebug("TEST PAINTING"); //Test Menu QString fileName = "images/" + platform + "/menu.png"; QMenu menu; @@ -538,6 +542,19 @@ void tst_QStyle::testPainting(QStyle *style, const QString &platform) pixmap = QPixmap::grabWidget(&mdiArea); mdiArea.hide(); comparePixmap(fileName, pixmap); + + // QToolButton + fileName = "images/" + platform + "/toolbutton.png"; + QToolButton tb; + tb.setToolButtonStyle(Qt::ToolButtonTextUnderIcon); + tb.setText("AaQqPpXx"); + tb.setIcon(style->standardPixmap(QStyle::SP_DirHomeIcon)); + tb.setStyle(style); + tb.show(); + pixmap = QPixmap::grabWidget(&tb); + tb.hide(); + comparePixmap(fileName, pixmap); + } void tst_QStyle::testMacStyle() |