diff --git a/src/apps/qcam/meson.build b/src/apps/qcam/meson.build
index 8eb815eed..ef4209389 100644
--- a/src/apps/qcam/meson.build
+++ b/src/apps/qcam/meson.build
@@ -40,7 +40,6 @@ qt6_cpp_args = [
     apps_cpp_args,
     '-DQT_NO_KEYWORDS',
     '-Wno-extra-semi',
-    '-Wno-sfinae-incomplete',
 ]

 # gcc 12 and 13 output a false positive variable shadowing warning with Qt
@@ -50,6 +49,10 @@ if qt6_dep.version().version_compare('>=6.9.0') and \
     qt6_cpp_args += ['-Wno-shadow']
 endif

+if cxx.get_id() == 'gcc' and cxx.version().version_compare('>=16')
+    qt6_cpp_args += ['-Wno-sfinae-incomplete']
+endif
+
 resources = qt6.preprocess(moc_headers : qcam_moc_headers,
                            qresources : qcam_resources,
                            dependencies : qt6_dep)
