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. How to run qml in release app
Forum Updated to NodeBB v4.3 + New Features

How to run qml in release app

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.0k 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.
  • B Offline
    B Offline
    bronstein87
    wrote on last edited by
    #1

    i compiled release version of my app, added all needed libs, then when i tried to start qml part of my app with this code:

    engine.reset(new QQmlApplicationEngine );
    engine->load(QUrl(QStringLiteral("qrc:/main.qml")));

    nothing happend. what could be wrong? maybe i need to add some extra files to folder with exe?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      engine is some kind of smart pointer, isn't it? I just wonder why you call reset() there.

      Does your application work correctly when you run it in your development environment? (from QtCreator or whatever)

      Try running the app from console and seeing if it prints any errors.

      (Z(:^

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bronstein87
        wrote on last edited by
        #3

        Yes, it works ok in QtCreator. If i run it from qt console everything works correctly. It means that i forgot to add some libs?

        sierdzioS 1 Reply Last reply
        0
        • B bronstein87

          Yes, it works ok in QtCreator. If i run it from qt console everything works correctly. It means that i forgot to add some libs?

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @bronstein87 said in How to run qml in release app:

          Yes, it works ok in QtCreator. If i run it from qt console everything works correctly.

          I've meant plain cmd.exe, without any Qt libs added to %path% or anything.

          It means that i forgot to add some libs?

          Yes, most probably it does. See: http://doc.qt.io/qt-5/windows-deployment.html

          Or, to see which libs are missing exactly, use dependency walker http://www.dependencywalker.com/ It's use is described towards the bottom of the deployment guide.

          (Z(:^

          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