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. QGuiApplication constructor failing
Forum Updated to NodeBB v4.3 + New Features

QGuiApplication constructor failing

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.3k 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.
  • M Offline
    M Offline
    mrjones
    wrote on last edited by
    #1

    My Qt 5.1.0 Windows application runs fine within creator.
    When I copy it to another directory, with all the required DLLs, it seems to be exitting somewhere in QGuiApplication.
    I'm logging line by line, to file, and it doesn't make it past the call to
    @ QGuiApplication app(argc, argv);@

    I get the usual "This application has requested the Runtime to terminate it in an unusual way" popup, but nothing more.

    I put a try{}catch block round the call just in case, and that's not getting triggered.

    Any ideas what could be causing this?
    Thanks.
    Matt.

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

      Hi and welcome to devnet,

      Did you check the "Deployement Guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html ?

      Have a look at the plugin part (platform plugins to be precise)

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrjones
        wrote on last edited by
        #3

        [quote author="SGaist" date="1379938870"]Hi and welcome to devnet,[/quote]

        Thanks.

        [quote] Did you check the "Deployement Guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html ?[/quote]

        Of course not! How would I know that my application needs plugins when it runs happily in creator :-)

        [quote] Have a look at the plugin part (platform plugins to be precise)

        Hope it helps[/quote]

        That did the job. Thank you!

        Seems quite poorly documented compared to the rest of Qt. I've been using it for 5 months without resorting to outside help, and the online docs, old forum posts, and stackoverflow usually suffice.

        There doesn't seem to be a "tell me which plugins my application needs" helper anywhere.

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          [quote author="mrjones" date="1379945063"]
          There doesn't seem to be a "tell me which plugins my application needs" helper anywhere.
          [/quote]
          There is no easy way to tell what dynamic plugins your application needs, because they are loaded on demand.
          But there are tools available (on windows "ProcessExplorer":http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx for example) to check which libraries your application currenltly has loaded. Every loaded library of the qt plugins directory should be deployed with your application then.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrjones
            wrote on last edited by
            #5

            [quote author="raven-worx" date="1379946316"]...
            But there are tools available (on windows "ProcessExplorer":http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx for example) to check which libraries your application currenltly has loaded. Every loaded library of the qt plugins directory should be deployed with your application then.
            [/quote]

            Thanks; that's a good tip.

            I arrived at the same result by qDebug()ing the library search path in my debug version, which pointed me at the full list that Qt loads when running in creator, then copying them all to my mock installation. I removed them selectively to get the minimum working set.

            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