Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
1.16.0
-
None
Description
So I have a qbs project where files are located in subfolders.
import qbs CppApplication { name: "test" cpp.cxxLanguageVersion: "c++17" Depends { name: "Qt"; submodules: ["core", "qml"] } Qt.qml.importName: "test" Qt.qml.importVersion: "1.0" files: [ "main.cpp", "test/test.h" ] }
#pragma once #include <QObject> #include <qqml.h> class Test : public QObject { Q_OBJECT QML_ELEMENT };
If I try to use new QML type registration, qmlregistar generates file, where test.h gets included via include path.
#include <QtQml/qqml.h> #include <QtQml/qqmlmoduleregistration.h> #include <test.h> void qml_register_types_test() { qmlRegisterTypesAndRevisions<Test>("test", 1); qmlRegisterModule("test", 1, 0); } static const QQmlModuleRegistration registration("test", 1, qml_register_types_test);
So I get obvious error: fatal error C1083: Cannot open include file: 'test.h': No such file or directory
May be I don't understand something or is it a qbs/qmlregistrar problem?
Attachments
Issue Links
- duplicates
-
QBS-1579 Must add project's own source directory to cpp.includePaths in order to get new QML type registration to work
- Closed