In a standard case people have an opportunity to create qml-plugins with C++. It is very easy, however whole internet have nothing about creating qml-components. I mean not really "creating" a component but making it able to package and deploy, something like "qmake; make; make install" algorithm which will look for qmldir file and add to "install" a copy action of qml-components described there.
In case of C++-plugin I am able to create a makefile which will install anything in the right places (shared library and qmldir). I need this for qml files but for qml files we have no any Makefile.
Back to reality, I've made my own qml-control. I want to package it into a deb file and upload it to my ppa, after that I wanna use it as dependency in another projects. What steps should I follow in order to create what I've said above here?
Control.qml
import QtQuick 2.2
Rectangle {
width:20
height:20
}
qmldir
module my.controls
Control 1.0 Control.qml
plugin mycontrols
You just follow the same install procedure except that you install the components into a path where they will be recognized when they are imported. See the import path list in the engine.
By default, the list contains the directory of the application executable, paths specified in the QML2_IMPORT_PATH environment variable, and the builtin Qml2ImportsPath from QLibraryInfo.