Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.7.2
-
None
-
Qt Commercial
Description
QtQuick.Shapes API cannot be found by the QML compiler when QT_QMLCACHEGEN_DIRECT_CALLS is enabled.
Compilation fails with `error: private/qquickshape_p.h: No such file or directory`.
/test/build/Desktop_Qt_6_7_2-Debug/.rcc/qmlcache/apptest_Main_qml.cpp:19:10: fatal error: private/qquickshape_p.h: No such file or directory
19 | #include <private/qquickshape_p.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~`
Edit:
It worked.
The interface is a bit odd because one needs to specify QuickShapesPrivate in find_package, which breaks the usual pattern of finding packages that are not explicitly private and then linking to their private libraries in them via target_link_libraries. Nevertheless it worked, so thank you!
The resulting code looks like this:
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick QuickShapesPrivate)
target_link_libraries(apptest
PRIVATE Qt6::Quick
Qt6::QuickPrivate
Qt6::QuickShapesPrivate
)