Importing QML plugin

asked 2014-08-26 00:05:45 +0300

FloR707 gravatar image

updated 2014-08-28 13:49:32 +0300

eric gravatar image


i wrote two c++ classes I want to load into my project als QML plugins. When I run the rpm validator I get the error import 'className 1.0' is not allowed and a link to the FAQ page. I read the section three times but I just do not understand what they try to tell me. I renamed the files to harbour.myAppName.className.cpp but that did not do the trick. So what are they trying to tell me?


edit retag flag offensive close delete


is your plugin deployed correctly? Is it deployed to the default location (under /usr/lib/qt5/plugins) or to some custom one?

tortoisedoc ( 2014-08-26 11:55:50 +0300 )edit

I have no clue where it is deployed. How can I make sure that they are at the right place? The c++ files are within the src folder iny project.

FloR707 ( 2014-08-26 12:17:20 +0300 )edit

See "Can I use QML modules, which I ship together with the application?" in

tortoisedoc ( 2014-08-26 13:58:46 +0300 )edit

If the FAQ would have helped me to understand the problem, I would not have made the post... As I wrote, I do not understand what they try to tell me. I just read it again but these few lines just raise questions for me. Where do I have to put my files within the Qt Creator project? What files need to be named according to the FAQ? How do I influence the install path. I already look at other project but cannot see what they do differently with their C++ code. So is there a page explaining this in depth? I just want to include two C++ classes with additional functionality.

FloR707 ( 2014-08-26 14:03:55 +0300 )edit

The FAQ refers to the plugin name (which is then used in qml to identify the plugin). From what I understand in this discussion, perhaps you should start with QML plugin basics

tortoisedoc ( 2014-08-26 16:17:59 +0300 )edit