Open ronjouch opened 8 years ago
Hi, it's not necessary to include a .pri or to register Material type in your project. What you need, is to add a Make build step in qtcreator for the qml-material project to install the Material plugin at the end of the build. This step will do "make install". This last will copy qml and material plugin to be available for your project.
After that, you only need to add in your qml files:
import Material 0.3 import Material.ListItems 0.1 as ListItem import Material.Extras 0.1
right now, the installer for Material winds up in the Qt directory. Are you saying it would copy these from here into my project? Suppose i want the Material QML as resources?
If correct, the doc patch above should fix point 1. (document registration steps).
I'm still unsure about point 2. (how to un-confuse QtCreator), feedback welcome.
Hi,
The file material.pri should contain:
INCLUDEPATH += $$PWD/src
Hi, this is a followup to a gitter discussion.
I'm a newcomer to qml-material and am struggling with using/building it. When trying to use qml-material in my own qtquick1 application following the Per-project installation using git submodules and trying various ways to bundle/import it (qmldir-based
import Material 0.2
, qrc-styleimport "qrc:/Material"
), I was getting the sameModule "Material" is not installed
as other users reported on GitHub/Gitter/SO.From looking at the doc and issue reports, I understood that #137 is outdated because 0.1's project structure changed (no more single
modules
folder), so its former solution is no longer valid for ≥ 0.2. I remained unsure of whether I needed toaddImportPath()
anything. Then I got help on your Gitter channel:engine.addImportPath(":/.");
to my main.cpp, and change anyimport Material 0.2
to0.3
in my qml.→ That helped, my build succeed :)
However, I then had runtime errors like
qrc:///Material/ActionButton.qml:85: ReferenceError: Units is not defined
. @voidware helped again, telling me to register qml-material with:→ Two things:
material.pri
)? If not, should I propose a doc PR including these instructions be part of the installation guide?import Material 0.3
statement highlighted in red, and my usages of Material components (e.g.ActionButton {}
) appear unrecognized/un-colored by QtCreator. Is there a way to fix this?QML_IMPORT_PATH += external/material/src/components external/material/src/controls ...
line to my .pro, but that didn't seem to help and I'm confused about this variable, which I may be mixing with QML2_IMPORT_PATH. Again, should everything work after includingmaterial.pri
, or can I help enhance the documentation?QML2_IMPORT_PATH
, it’s just to help QtCreator do its autocompletion; however I just realized it’s not really compatible with the new structure since it doesn’t follow the module import structure"_Halp :worried: . I'm running the latest qml-material 0cada50ee5469efdeb37e9eb2f5e8de0194b6ba6 on branch develop on Qt 5.6.0 on Ubuntu 14.04.4LTS x64, feel free to ask for additional debug info. The project looks great, thanks for the work, can't wait to try it.