diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro
index c7096b6b69f941345aad778035228f70b7aa1b61..de00e5f0722566fba43e58685c22926e131ef2a1 100644
--- a/tests/auto/widgets/widgets.pro
+++ b/tests/auto/widgets/widgets.pro
@@ -13,7 +13,7 @@ SUBDIRS += \
     qwebenginesettings \
     qwebengineview
 
-!contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
+contains(WEBENGINE_CONFIG, use_spellchecker):!cross_compile {
     !contains(WEBENGINE_CONFIG, use_native_spellchecker) {
         SUBDIRS += qwebenginespellcheck
     } else {