-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hello,
I am using you library (Very beautiful, Thanks :) ) in a qmake application (qt 6.6.3).
I had to make minor changes in order to get it working. Here's what I had to do. Maybe you can make a small chapter on what to set up in order to use your library.
- Create a subfolder in your project directroy (For example RoniaKit) and copy the contents from the resources folder into it.
- Create a new qmldir file in the RoniaKit folder.
- Open your resource file (qml.qrc) and add a new Prefix with the name /RoniaKit. If you named the new subfolder differently, name the prefix accordingly. Otherwise qmake will not recognise the module!
- Add all the files from RoniaKit subfolder to the new prefix in the resource file
- Create the module and add all qml files to the qmldir file:
module RoniaKit
HalfDial 1.0 Components/Gauges/HalfDial.qml
Thermometer 1.0 Components/Gauges/Thermometer.qml
...
- Add the module to your qt engine:
engine.addImportPath("qrc:/RoniaKit"); - Add the path to the qml import path in your *.pro file:
QML_IMPORT_PATH += $$PWD/RoniaKit
- Everytime a resource file is loaded (font, picture, etc.) the path is not correctly set up. Insted of
source: "qrc:/RoniaKit/resources/...,
source: "qrc:/RoniaKit/RoniaKit/...
must be used. The issue is that qml doesn't load the module if the prefix is/RonialKit
and the qmldir file is in /resources. Maybe there is another way but I didn't figure it out.
Follwing these steps, you can use the components in your qmake application by using import RoniaKit
Metadata
Metadata
Assignees
Labels
No labels