-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.2
-
None
-
Qt version: 6.9.2 (MSVC 2022 64-bit)
Windows 11 x64
Installed using official Qt online installer
Checked CMake builds
What did you do?
- Installed Qt 6.9.2 (MSVC 2022 64-bit) via the official Qt installer.
- Tried to use the QShader class in a CMake-based project, following the official documentation:
[QShader Class | Qt GUI | Qt 6.9.2|http://doc.qt.io/qt-6/qshader.html] - CMakeLists.txt contains:
cmake
find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::Gui)
- Source code contains:
#include <QShader>
What did you expect to happen?
I expected the project to compile successfully, and for the header <QShader> (or qshader.h) to be found in the default QtGui include directory, as is typical for other public Qt classes.
What happened instead?
The compiler reports that <QShader> cannot be found. Manually checking the installation directories:
- There is no QShader or qshader.h in
C:\Qt\6.9.2\msvc2022_64\include\QtGui - The file is only present at:
C:\Qt\6.9.2\msvc2022_64\include\QtGui\6.9.2\QtGui\rhi\qshader.h
This is inconsistent with the documentation, which states:
#include <QShader>
and does not mention the need to include from an rhi subdirectory.