Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. qt 6.1, qml, error: "Object is not a type"
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Qt 6
2 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cyrille de Brebisson
    wrote on 30 Mar 2021, 12:11 last edited by
    #1

    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

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Cyrille de Brebisson
      wrote on 31 Mar 2021, 07:07 last edited by
      #2

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

      Cyrille

      1 Reply Last reply
      0

      1/2

      30 Mar 2021, 12:11

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved