Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. I Can't execute Qt programs Consistently.
Forum Updated to NodeBB v4.3 + New Features

I Can't execute Qt programs Consistently.

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 3 Posters 3.0k Views 3 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
    arealperson
    wrote on last edited by
    #1

    I must use Windows 7 and Qt 5.3.1
    I can’t use Qt because I can’t get passed the following error/ issue…

    “This application failed to start because it could not find or load the Qt platform plugin "windows".”

    I solve it for one application only to have it popup on the next one.
    For example... I had the issue with the “analogclock.exe” example. So, I copied the following files
    to a directory that is on my path.

    icudt52.dll
    icuin52.dll
    icuuc52.dll
    Qt5Core.dll
    Qt5Gui.dll
    Qt5Widgets.dll

    And, that fixed it for that application. However, I then compiled examples/quick/tutorials/gettingStartedQml and tried to run it only to have the same issue.

    So, I can make a complex program without errors using Qt, But I can’t execute
    the program because I can’t get it set for distribution.

    Please help,

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      The deployment has been discussed here many times. Please follow this link to read about it and search the forum if you have doubts. You will find a dozen threads with examples easily.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        arealperson
        wrote on last edited by arealperson
        #3

        Thank you, but that is not for 5.3.1.

        I can't get C:\Qt\5.3.1\Examples\Qt-5.3\quick\tutorials\gettingStartedQml\filedialog to execute.

        I do a...
        "C:\Qt\5.3.1\5.3\msvc2010_opengl\bin\qmlscene -I ./imports texteditor.qml"
        Note: The directory structure is just like the 5.3.1 example. Then I get...

        file:///C:/qt-labs/lab21/texteditor.qml:51 Type MenuBar unavailable
        file:///C:/qt-labs/lab21/core/MenuBar.qml:145 Type FileMenu unavailable
        file:///C:/qt-labs/lab21/core/FileMenu.qml:42 module "FileDialog" is not installed

        I can't get it to load texteditor.qml correctly no matter where I put it, or the other files.

        Why can't it find these qml files, they are right there ?

        Please help,

        JKSHJ 1 Reply Last reply
        0
        • A arealperson

          Thank you, but that is not for 5.3.1.

          I can't get C:\Qt\5.3.1\Examples\Qt-5.3\quick\tutorials\gettingStartedQml\filedialog to execute.

          I do a...
          "C:\Qt\5.3.1\5.3\msvc2010_opengl\bin\qmlscene -I ./imports texteditor.qml"
          Note: The directory structure is just like the 5.3.1 example. Then I get...

          file:///C:/qt-labs/lab21/texteditor.qml:51 Type MenuBar unavailable
          file:///C:/qt-labs/lab21/core/MenuBar.qml:145 Type FileMenu unavailable
          file:///C:/qt-labs/lab21/core/FileMenu.qml:42 module "FileDialog" is not installed

          I can't get it to load texteditor.qml correctly no matter where I put it, or the other files.

          Why can't it find these qml files, they are right there ?

          Please help,

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi,

          @arealperson said:

          Thank you, but that is not for 5.3.1.

          The principles are the same, from Qt 5.0 to Qt 5.4 and beyond.

          @arealperson said:

          I copied the following files to a directory that is on my path.

          icudt52.dll
          icuin52.dll
          icuuc52.dll
          Qt5Core.dll
          Qt5Gui.dll
          Qt5Widgets.dll

          And, that fixed it for that application. However, I then compiled examples/quick/tutorials/gettingStartedQml and tried to run it only to have the same issue.

          You need to deploy different files, depending on what dependencies your program uses. For example, Qt Quick programs don't need Qt5Widgets.dll, but do need other files (e.g. qmldir files). See http://wiki.qt.io/Deploy_an_Application_on_Windows for the quickest way to guarantee you have the files you need.

          I can't get C:\Qt\5.3.1\Examples\Qt-5.3\quick\tutorials\gettingStartedQml\filedialog to execute.

          I do a...
          "C:\Qt\5.3.1\5.3\msvc2010_opengl\bin\qmlscene -I ./imports texteditor.qml"
          Note: The directory structure is just like the 5.3.1 example. Then I get...

          file:///C:/qt-labs/lab21/texteditor.qml:51 Type MenuBar unavailable
          file:///C:/qt-labs/lab21/core/MenuBar.qml:145 Type FileMenu unavailable
          file:///C:/qt-labs/lab21/core/FileMenu.qml:42 module "FileDialog" is not installed

          I can't get it to load texteditor.qml correctly no matter where I put it, or the other files.

          Why can't it find these qml files, they are right there ?

          In this case, it's because FileDialog is a C++ plugin that you need to build first, as part of the tutorial -- see http://doc.qt.io/qt-5/gettingstartedqml.html#extending-qml-using-qt-c.

          MenuBar.qml and FileMenu.qml were found, but they could not be loaded because the FileDialog plugin is missing. Notice that the error messages are different.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • A Offline
            A Offline
            arealperson
            wrote on last edited by
            #5

            No, Thats the problem.

            I followed the tutorial at (http://doc.qt.io/qt-5/gettingstartedqml.html#extending-qml-using-qt-c).
            I use the example files as is from inside "C:\Qt\5.4.0\Examples\Qt-5.4\quick\tutorials\gettingStartedQml"

            I compile with qmake then after, I do a nmake and "imports\filedialogplugin.dll" is created.

            I then enter...
            "qmlscene -I ./imports texteditor.qml"

            That's when I get the error from.

            Could someone explain what the program is supposed to do at that point. It's my understanding that when I type
            "qmlscene -I ./imports texteditor.qml"
            The editor is to load and be ready for text input OR be ready to load a file into the editor.

            Is that correct ?

            I've tried this on 2 different machines and I cannot get that example to work.

            JKSHJ 1 Reply Last reply
            0
            • A arealperson

              No, Thats the problem.

              I followed the tutorial at (http://doc.qt.io/qt-5/gettingstartedqml.html#extending-qml-using-qt-c).
              I use the example files as is from inside "C:\Qt\5.4.0\Examples\Qt-5.4\quick\tutorials\gettingStartedQml"

              I compile with qmake then after, I do a nmake and "imports\filedialogplugin.dll" is created.

              I then enter...
              "qmlscene -I ./imports texteditor.qml"

              That's when I get the error from.

              Could someone explain what the program is supposed to do at that point. It's my understanding that when I type
              "qmlscene -I ./imports texteditor.qml"
              The editor is to load and be ready for text input OR be ready to load a file into the editor.

              Is that correct ?

              I've tried this on 2 different machines and I cannot get that example to work.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on last edited by JKSH
              #6

              @arealperson said:

              Could someone explain what the program is supposed to do at that point. It's my understanding that when I type
              "qmlscene -I ./imports texteditor.qml"
              The editor is to load and be ready for text input OR be ready to load a file into the editor.

              Is that correct ?

              Yes, that's correct. However, the editor could not be loaded because the plugin could not be loaded. (I'm guessing it can't be found in the location you specified)

              qmlscene -I ./imports texteditor.qml means: Use qmlscene.exe to load texteditor.qml from <CurrentFolder>, importing plugins from <CurrentFolder>\imports\

              So, make sure you have this folder structure:

              • <CurrentFolder>\texteditor.qml
              • <CurrentFolder>\imports\FileDialog\filedialogplugin.dll
              • <CurrentFolder>\imports\FileDialog\qmldir

              You can change the import directory by changing the -I option. For example, you can get rid of the "imports" folder by asking it to import from the current folder:

              qmlscene -I . texteditor.qml

              • <CurrentFolder>\texteditor.qml
              • <CurrentFolder>\FileDialog\filedialogplugin.dll
              • <CurrentFolder>\FileDialog\qmldir

              Note that qmlscene.exe is intended for debugging QML files. If you want to deploy a Qt Quick program, open Qt Creator and create a proper application: "File" -> "New File or Project..." -> "Application" -> "Qt Quick Application". This lets you compile an executable that users can double-click to launch (after you include the *.dll, *.qml, and qmldir files in the correct locations).

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              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