Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
relate to qmlRegisterType
Monikarajendra last edited by aha_1980
qmlRegisterType<BackEnd>("io.qt.examples.backend", 1, 0, "BackEnd");can somebody specify what to give for the first parameter "io.qt.examples.backend" to register a class in QML and am getting error as qmlRegisterType is not declared in the scope
qmlRegisterType is not declared in the scope
You have to include the correct header.
can somebody specify what to give for the first parameter "io.qt.examples.backend"
While your issue has nothing to do with that URL, I'll still answer: it can be anything. Any string (well let's say any ascii alphanumeric string).
Monikarajendra last edited by
even after including that appropriate headerfile am still facing the same error
Hm that's unlikely. Is your BackEnd a qobject?
shaan7 last edited by
@Monikarajendra can you paste the exact error? Makes it much easier to find out the solution.
One more question: are you using Qt 4 by any chance?