[Qt-creator] QML_ELEMENT crunchiness

Jason H jhihn at gmx.com
Fri Apr 23 15:59:44 CEST 2021

I have the QML_ELEMENT a shot today on a class.

+++ pro.pro
CONFIG += qmltypes
QML_IMPORT_NAME = com.company

+++ class.cpp
#include <QtQml>

class JsonSerialPort : public QObject

However this method is interior to my experience using the old qmlRegister() integration.
1. In QML file, the import statement gives: "QML Module not found" in the linter.
2. No contezt sensitive autocompletion is offered.

I expected these to be resolved on compile of the project, but they were not.

More information about the Qt-creator mailing list