Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qt 6.1, qml, error: "Object is not a type"



  • Hello,

    I am trying to migrate a QT/QML app to QT 6.1.

    After fixing all the C++ side compilations errors, the app finally compiles, link, but at startup, the qml loading fails with the following errors:

    QQmlApplicationEngine failed to load component
    qrc:/qml/mainSplash.qml: Type HPACIcons unavailable
    qrc:/qml/IconFont/IconFont.qml:4:1: Object is not a type
    

    The IconFont.qml file starts with the following lines:

    pragma Singleton
    import QtQuick 2.11
    
    Object {
    ....
    

    Obviously, the app, as is works under qt 5.
    any clues what is going wrong here and what I need to change?

    Thanks,

    Cyrille



  • Well, turned out my qmldir was incorrect.
    it is strange that it worked under QT5 however.

    Cyrille


Log in to reply