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. Qmlqtimeexampleplugin not working
Forum Updated to NodeBB v4.3 + New Features

Qmlqtimeexampleplugin not working

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 2.4k 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
    alexander.merkel
    wrote on last edited by
    #1

    has anyone got this pluginexample working? In my case it complains abaout not finding the plugins just like in my own examples and i cant wrap my head around why.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shadabk92
      wrote on last edited by
      #2

      Hello,
      Please paste the exact error you are facing.
      Or in your case which plugins is it not able to find, mention them clearly.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        johnco3
        wrote on last edited by
        #3

        I too am also failing to load this plugin, when I run the application, it prompts for a QML file (qmlscene.exe). If I point the qmlscene to the plugins.qml - it spits out the following error information in the application output. The compile output seems to have no errors.

        Starting C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin\qmlscene.exe...
        file:///C:/Qt/Qt5.1.1/5.1.1/msvc2012_64_opengl/examples/qml/plugins/plugins.qml:41 module "TimeExample" is not installed

        C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\bin\qmlscene.exe exited with code -1

        1 Reply Last reply
        0
        • J Offline
          J Offline
          johnco3
          wrote on last edited by
          #4

          OK after mindlessly experimenting, I finally got the above plugin example to launch a clock - but I am not really sure why it should be so difficult given that many of the other examples simply work without having to do any special tricks other than qmake, build and run.

          Anyway here are the steps I went through and hopefully someone can let me know what step is missing in my installation.

          With the plugins project open, run clean, qmake & build to create the plugin dll. This built a debug plugin which was placed in the following strange folder (I don't know why QT puts files in this strange location). I would have thought it would have been placed within the project folder itself - but I guess its cleaner this way.

          @C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\examples\qml\build-plugins-Desktop_Qt_5_1_1_MSVC2012_OpenGL_64bit-Debug\imports\TimeExample@

          I then opened up a command prompt and attempted to do as per the instructions provided with the plugin

          @qmlscene -I imports plugins.qml@

          This indicated:

          @file:///C:/Qt/Qt5.1.1/5.1.1/msvc2012_64_opengl/examples/qml/plugins/plugins.qml:41 module "TimeExample" plugin "qmlqtimeexampleplugin" not found@

          Looks like this means that it could not find the built dll plugin.

          I then merged the contents of the debug build output from @C:\Qt\Qt5.1.1\5.1.1\msvc2012_64_opengl\examples\qml\build-plugins-Desktop_Qt_5_1_1_MSVC2012_OpenGL_64bit-Debug\imports\TimeExample@ into @imports\TimeExample@

          basically the following build files were copied into the imports/TimeExample folder.

          @qmlqtimeexampleplugin.dll
          qmlqtimeexampleplugin.dll.embed.manifest
          qmlqtimeexampleplugin.dll_manifest.rc
          qmlqtimeexampleplugin.dll_manifest.res
          qmlqtimeexampleplugin.exp
          qmlqtimeexampleplugin.ilk
          qmlqtimeexampleplugin.lib
          qmlqtimeexampleplugin.pdb@

          Then I re-ran qmlscene

          @qmlscene -I imports plugins.qml@
          and it indicated
          @file:///C:/Qt/Qt5.1.1/5.1.1/msvc2012_64_opengl/examples/qml/plugins/plugins.qml:41 plugin cannot be loaded for module "TimeExample": The plugin 'C:/Qt/Qt5.1.1/5.1.1/msvc2012_64_opengl/examples/qml/plugins/imports/TimeExample/qmlqtimeexample
          plugin.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)@

          I then added CONFIG += release to the pro file and merged teh build output and it worked!!!!

          OUCH how can this be so difficult!!! what is going wrong here. I am trying to create a plugin - could someone please help me to do this correctly and fix my configuration. I am a complete noob to QT and I need some experienced guidance to get me on the right track.

          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