Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQmlApplicationEngine failed to load component in qt6.2
Forum Updated to NodeBB v4.3 + New Features

QQmlApplicationEngine failed to load component in qt6.2

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 3 Posters 4.1k 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.
  • A Offline
    A Offline
    Azmuth
    wrote on last edited by Azmuth
    #1

    Facing this issue in qt6.2 while using QQMLApplicationEngine and thereafter not able to recognize qml custom component because of it. Have been searching about it but neither solution worked.

    94265cb4-fc9a-4eb4-a17c-ba3a1cf8fb8b-image.png

    JonBJ 1 Reply Last reply
    0
    • A Azmuth

      Facing this issue in qt6.2 while using QQMLApplicationEngine and thereafter not able to recognize qml custom component because of it. Have been searching about it but neither solution worked.

      94265cb4-fc9a-4eb4-a17c-ba3a1cf8fb8b-image.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Azmuth
      Do you want to show what line #14 in main.qml reads?

      A 1 Reply Last reply
      0
      • JonBJ JonB

        @Azmuth
        Do you want to show what line #14 in main.qml reads?

        A Offline
        A Offline
        Azmuth
        wrote on last edited by
        #3

        @JonB Sure. Here you go:
        2422cd60-6ff5-432b-8af1-04a8abeec873-image.png

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          What is the location of Background.qml file ? Looks like some import issue.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          A 1 Reply Last reply
          0
          • dheerendraD dheerendra

            What is the location of Background.qml file ? Looks like some import issue.

            A Offline
            A Offline
            Azmuth
            wrote on last edited by
            #5

            @dheerendra It's inside my QML folder and I did try giving the path at the top i.e. import "qrc:///Qt/project/sidechic/QML/Background.ui.qml" but it didn't work.
            Btw I am following this tutorial : https://www.youtube.com/watch?v=GkzncJ71mm0&t=131s but their project is working fine.

            Also, here I am sharing my main.cpp to get a better picture of my code:
            a1ecee70-a316-468c-9f7d-ab78bc77a158-image.png

            1 Reply Last reply
            0
            • dheerendraD Offline
              dheerendraD Offline
              dheerendra
              Qt Champions 2022
              wrote on last edited by
              #6

              It is named as Background.ui.qml. Can you change the name to Background.qml & try ?
              Also confirm whether Receiver is working ?

              Dheerendra
              @Community Service
              Certified Qt Specialist
              http://www.pthinks.com

              A 1 Reply Last reply
              0
              • dheerendraD dheerendra

                It is named as Background.ui.qml. Can you change the name to Background.qml & try ?
                Also confirm whether Receiver is working ?

                A Offline
                A Offline
                Azmuth
                wrote on last edited by
                #7

                @dheerendra It is giving problem to my whole file then. Even rebuild is also showing issue after changing the ui.qml to qml. a7ebbd3c-1c40-4a0e-af90-021e8dac7862-image.png

                1 Reply Last reply
                0
                • dheerendraD Offline
                  dheerendraD Offline
                  dheerendra
                  Qt Champions 2022
                  wrote on last edited by
                  #8

                  You need to rename this in qrc file also. I think you changed the file name only in directory. qrc file still has old file name

                  Dheerendra
                  @Community Service
                  Certified Qt Specialist
                  http://www.pthinks.com

                  A 2 Replies Last reply
                  1
                  • dheerendraD dheerendra

                    You need to rename this in qrc file also. I think you changed the file name only in directory. qrc file still has old file name

                    A Offline
                    A Offline
                    Azmuth
                    wrote on last edited by
                    #9

                    @dheerendra Yeah I changed it there and now it's not showing that error but it's showing the error for custom component used inside the Background. b9d6ba33-e61e-4ee0-bf75-1b76bc0da97a-image.png 9afc5219-de35-4fd3-8485-9ae5ccad43dc-image.png

                    I believe it's cause I still have this one file circle.ui.qml used as a custom component by sender.qml file. So will change the circle.ui.qml to .qml only file.
                    But I have few questions that:

                    1. Is .ui.qml file not supported anymore in Qt6? Cause I can't see the template for it either like I explicitly created .ui.qml by using .qml file template (yeah I created that cause they told to use ui.qml only) unlike the video, they used a specific .ui.qml file which was available in there Qt version.
                      2)Or is there no difference between .ui.qml and .qml file now? as i said above that the latest version shows only qml file template, not the other one? Or am I missing something?
                    1 Reply Last reply
                    0
                    • dheerendraD dheerendra

                      You need to rename this in qrc file also. I think you changed the file name only in directory. qrc file still has old file name

                      A Offline
                      A Offline
                      Azmuth
                      wrote on last edited by
                      #10

                      @dheerendra Yay its working! Thanks a lot! So I guess there is no difference in ui.qml and .qml after all especially in qt6.2

                      dheerendraD 1 Reply Last reply
                      0
                      • A Azmuth

                        @dheerendra Yay its working! Thanks a lot! So I guess there is no difference in ui.qml and .qml after all especially in qt6.2

                        dheerendraD Offline
                        dheerendraD Offline
                        dheerendra
                        Qt Champions 2022
                        wrote on last edited by
                        #11

                        @Azmuth Nothing specific in ui.qml. It is just a name of the file. It has qml code itself. So your component name should have been Background.ui {} (whatever name exist before .qml extension)

                        Dheerendra
                        @Community Service
                        Certified Qt Specialist
                        http://www.pthinks.com

                        1 Reply Last reply
                        1

                        • Login

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