How should I deploy an application that uses Qt.labs.particles?

  • Hi,

    I'm trying to develop a simple game based on QML and I stumbled into a problem with application deployment. I managed to supply all necessary DLLs (QtCore, mingw, etc.) and imageformats plugins (qsvg4.dll) but I do not understand how to show my application qmlparticles.dll file which is responsible for QML Particles Element.

    At the moment I've tried:

    1. Placing it into executable directory with/without provided 'qmldir' file
    2. Placing it into executable directory under imports/Qt/labs/qmlparticles.dll
    3. Adding qmldir and qmlparticles plugin into game resources (because all qml files are in the resource system)
      ... and some other combinations too

    None of it worked. How should it be done correctly?

    Thanks for your replies in advance.

  • I think both the plugin and the qmldir file should be under the imports/Qt/labs/particles directory.

    This is how it works in Linux, and I guess it's the same for Windows.

  • Should this directory be in executable folder? Or in resources? I tried both variants -- neither worked, may be I miss something.

  • The paths are specified by the QDeclarativeEngine. You can check the current path with QDeclarativeEngine::importPathList(), or add more with QDeclarativeEngine::addImportPath().

    In Linux, the default import paths are the current folder and "/usr/lib/qt4/imports". But the particles are registered as "Qt.labs.particles", so the system could find them at:

    You can find more details by reading the doc for QDeclarativeExtensionPlugin.

  • Thanks a lot, it works. It was one of the variants of directory structure which I missed.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.