diff -r 3b1da2848fc7 -r d3bac044e0f0 tests/auto/qstyle/tst_qstyle.cpp --- a/tests/auto/qstyle/tst_qstyle.cpp Fri Feb 19 23:40:16 2010 +0200 +++ b/tests/auto/qstyle/tst_qstyle.cpp Fri Mar 12 15:46:37 2010 +0200 @@ -52,6 +52,7 @@ #include #include #include +#include #include #include @@ -445,6 +446,8 @@ 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 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 @@ 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()