I am using Qt 5.15.2 and the qmake build system for the project. I have included Qt3D by adding Qt += 3dcore 3drender in the .pro file.
When building the project, I get this error from qgeoprojection_p.h, line 121:
field 'm_itemToWindowTransform' has incomplete type 'QTransform'
As far as I know, the qgeoprojection_p.h file is having issues with resolving #include <QTransform> and its using the QTransform defined inside the Qt3D instead of the GUI component.
I have raised a Qt bug for this.
How to get past this and use Qt3D in my project?
Unfortunately Qt provides different classes with the same name in different packages. To resolve this issue you need to explicitely specify which one you want to use, i.e. instead of doing
you need to include the package path in the include command
and use
Qt3DCore::QTransformandQtGui::QTransfromin your code.