@kkoehne said in Qt6, qmake: Does 'QT += openglwidgets' imply 'QT += opengl'?:
@Yuni said in Qt6, qmake: Does 'QT += openglwidgets' imply 'QT += opengl'?:
If it works and it's unspecified behavior, then it may not work on other machines or for future Qt versions.
Build and module dependencies usually don't change in a minor Qt version. For major Qt versions, things might get rearranged ... but then again there's no SC guarantee there in the first place :)
I think it's good practice to explicitly declare all the dependencies that you explicitly rely upon though. But this is arguably a matter of taste.
I would guess qopenglwidget.prf fetches qopengl.prf - you can take a look into them by your own.
For QT variable, it's actually .prifiles: mkspecs/modules/qt_lib_qopenglwidgets.pri, mkspecs/modules/qt_lib_qopengl.pri ...
I see, thank you so much! I'll declare them explicitly then.
I've found the .pri files (without the leading 'q', that is, so e.g. qt_lib_opengl.pri) and openglwidgets indeed has a dependency on opengl, explaining why the project compiles without the explicit declaration.