Hello, any idea why I'm getting the below error ? What tool is used to generate the *_qmltyperegistrations.cpp file, and how does it figure out to add the line `#include <A.h>` instead of `#include <view/A.h>` ?
On Fri, Jul 5, 2024 at 10:15 AM Stefan Seefeld <[email protected]> wrote: > Hello, > > following up on an earlier conversation... > > I'm trying to convert a legacy QML module to use the "new" > `qt_add_qml_module` function. This process includes the generation of a > ..._qmltyperegistrations.cpp file that contains an invalid reference to a > header file <A.h> > > My library layout looks like this: > > libs/foo/ > ├── CMakeLists.txt > ├── view > │ ├── A.h > │ ... > ├── qml > ... > > and the makefile above compiles a shared library libfoo.so from the > contents. I now want to use `qt_add_qml_module()` to automate the > generation of the associated QML module (including all the QML resources, > as well as exposing the QML types defined in C++, such as the one in > `view/A.h`. However, the generated code expects to be able to include > "A.h", while it should actually be including "view/A.h". Is there a > property I should be passing to `qt_add_qml_module()` to make that happen, > or is there anything else I'm missing ? > > For context: The type `A` is actually a singleton (a QQmlPropertyMap) > which is accessed directly from C++ code, so its C++ API needs to be > accessible as a regular class in the library, in addition to being > registered to the QML runtime. > > Thanks for any help, > > -- > > ...ich hab' noch einen Koffer in Berlin... > > -- ...ich hab' noch einen Koffer in Berlin...
_______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest
