Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qml plugin cannot be loaded in my qml project
Forum Updated to NodeBB v4.3 + New Features

Qml plugin cannot be loaded in my qml project

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.6k 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.
  • N Offline
    N Offline
    nan3113
    wrote on last edited by
    #1

    in qml file of qml project:
    import com.groveil.tools 1.5
    when I run it in creator, it outputs:
    plugin cannot be loaded for module "com.groveil.tools ": Cannot load library D:/brooks/com/groveil/tools/Button.dll: ?ò2?μ????¨μ??£?é?£
    in com/groveil/tools directory, there's a qmldir file,contents is simple like this: plugin Button
    plugin C++ implementation is also simple.

    @
    class BUTTON_EXPORT ButtonPlugin : public QDeclarativeExtensionPlugin
    {
    Q_OBJECT
    public:
    void registerTypes(const char *uri)
    {
    Q_UNUSED(uri);
    Q_ASSERT(QLatin1String(uri) == QLatin1String("com.groveil.tools "));

    qmlRegisterType<Button>("com.groveil.tools ", 1, 5, "Button");
    }
    };

    Q_EXPORT_PLUGIN2(Button, ButtonPlugin);
    @

    I don't know what's wrong?


    I find if I create a plugin which don't rely on other dlls, it can be loaded;
    here my plugin relys on another dll, even though I copy the another dll into the same directory of plugin, but plugin still can't be loaded.
    [EDIT: code formatting, please wrap in @-tags, Volker]

    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