Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't start Qt Quick application
Qt 6.11 is out! See what's new in the release blog

Can't start Qt Quick application

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 2 Posters 4.5k 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.
  • D Offline
    D Offline
    DavidM29
    wrote on last edited by
    #1

    Hello,
    I would like to make my first QT Quick application. To do so I made a new Qt Quick application project. And from here I've change nothing and tried to run it but it crash at startup.

    Here is the error I get :

    Starting C:\Users\MyProject\debug\MyProject.exe...
    The program terminated unexpectedly
    The process was ended forcefully.
    C:/Users/MyProject/debug/MyProject.exe crashed.
    

    I believe this error is due to a problem with my Qt instalation. I think it is not capable to find Qt Dll. But I don't know how to fix it. Can you please help me to do that ?

    Here is my .pro file :

    QT += quick
    CONFIG += c++11
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
            main.cpp
    
    RESOURCES += qml.qrc
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Additional import path used to resolve QML modules just for Qt Quick Designer
    QML_DESIGNER_IMPORT_PATH =
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    

    I haven't change anything from the project generated by Qt it should be good.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      You start app from within Creator ?
      If you are using a laptop with windows, make sure you updated the gfx drivers
      especially if its intel build in gfx.
      QML requires ok openGL to run.

      1 Reply Last reply
      1
      • D Offline
        D Offline
        DavidM29
        wrote on last edited by
        #3

        Thank you for your answer,
        Yes I do start the App within Creator.
        I have updated my Nvidia drivers, I have no GFX drivers and can't find one suitable for my computer on the intel Website, I have an old 3rd Generation i7.
        In fact I just found out that it is not only Qt quick application, standard UI Application crashes also...

        mrjjM 1 Reply Last reply
        0
        • D DavidM29

          Thank you for your answer,
          Yes I do start the App within Creator.
          I have updated my Nvidia drivers, I have no GFX drivers and can't find one suitable for my computer on the intel Website, I have an old 3rd Generation i7.
          In fact I just found out that it is not only Qt quick application, standard UI Application crashes also...

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @DavidM29
          Hi
          Do you mean that a normal Qt GUI app also crashes when run from Creator ?
          There might be some DLL conflict then.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DavidM29
            wrote on last edited by
            #5

            Yes, I just tried a previous GUI App and it crashes. I believe there is something wrong with my DLL. How can I check that ?

            mrjjM 1 Reply Last reply
            0
            • D DavidM29

              Yes, I just tried a previous GUI App and it crashes. I believe there is something wrong with my DLL. How can I check that ?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @DavidM29

              Hi
              So if you create a default empty GUI app, it can crash ?
              ( an older project , unless really clean, is not optimal)

              Anyway, some of the reason for such things.
              1: During install, the anti virus fuxed it up silently.
              cure is to reinstall with it off
              2: some other Qt are are installed on system and added its path to global path.
              3: Font issues. at least in win 7 , it could make it crash with a a bad font.
              4: Something is up with Creator and it dont setup paths correctly when it runs.

              Did you install Qt recently or did you have a big windows update ?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DavidM29
                wrote on last edited by
                #7

                I just tried with a new GUI App and here is the result :

                0_1527146893868_68c5b6a6-49fb-452a-be16-e10e1991691a-image.png

                I reinstalled Qt recently. I had an old version on my windows (I was using virtual machine with linux). And since I reinstalled it, it does not work anymore.
                Your second reason could be the reason why I have problem considering my old Qt kept its path and my new one added some.
                How can I make sure of that ?

                mrjjM 1 Reply Last reply
                0
                • D DavidM29

                  I just tried with a new GUI App and here is the result :

                  0_1527146893868_68c5b6a6-49fb-452a-be16-e10e1991691a-image.png

                  I reinstalled Qt recently. I had an old version on my windows (I was using virtual machine with linux). And since I reinstalled it, it does not work anymore.
                  Your second reason could be the reason why I have problem considering my old Qt kept its path and my new one added some.
                  How can I make sure of that ?

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @DavidM29

                  Hi
                  if you start
                  C:\Qt\MaintenanceTool.exe

                  Does it list more than one Qt installed ?
                  Normally its NOT an issue (Creator can use many version of Qt) but
                  odd crashes like this normally/often comes from wrong DLLs being loaded.

                  if you have other version of Qt on hd. Could you rename that folder for test if 5.11 than runs?

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DavidM29
                    wrote on last edited by
                    #9

                    I started it, then I tried to make update modules and Add or remove module but it tells me that I have no valid and active repository, at least one is required. So I suppose I have something real wrong. I try to remove everything I have around Qt and make a clean install.

                    mrjjM 1 Reply Last reply
                    0
                    • D DavidM29

                      I started it, then I tried to make update modules and Add or remove module but it tells me that I have no valid and active repository, at least one is required. So I suppose I have something real wrong. I try to remove everything I have around Qt and make a clean install.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by mrjj
                      #10

                      @DavidM29

                      Nah, it might not be something you did :)

                      But if an options, please remove all and use the online installer to install
                      one or more Qt versions.

                      I think its the fastest way to make it run :)

                      1 Reply Last reply
                      1
                      • D Offline
                        D Offline
                        DavidM29
                        wrote on last edited by
                        #11

                        I had issues using the online installer, I was stuck at 5% that is why I used Offline installer. So I uninstalled everything, and found an older version of that online installer and now everything seems good. Exept that I don't have the 5.11 but only 5.10 version of Qt don't know why it was not available on that installer. Is there a way to update Qt without downloading the entire package ?

                        mrjjM 1 Reply Last reply
                        0
                        • D DavidM29

                          I had issues using the online installer, I was stuck at 5% that is why I used Offline installer. So I uninstalled everything, and found an older version of that online installer and now everything seems good. Exept that I don't have the 5.11 but only 5.10 version of Qt don't know why it was not available on that installer. Is there a way to update Qt without downloading the entire package ?

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @DavidM29
                          well maintenance tool can update. :)

                          1 Reply Last reply
                          0

                          • Login

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