diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index 4f390fa2c8..8ac3fea457 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -72,9 +72,7 @@ #include #include #include -#ifndef QT_NO_STYLE_WINDOWS -#include -#endif +#include class tst_QComboBox : public QObject { @@ -2428,9 +2426,11 @@ void tst_QComboBox::subControlRectsWithOffset() #ifndef QT_NO_STYLE_WINDOWS void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup() { - class TestStyle: public QWindowsStyle + class TestStyle: public QProxyStyle { public: + TestStyle() : QProxyStyle(QStyleFactory::create("windows")) { } + int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *ret) const { if (hint == SH_ComboBox_Popup) return 1;