Style singleton
Solved
QML and Qt Quick
-
Hi
I want to implement the 'Style singleton' pattern.
My project files are contained in a folder and this has one subfolder named Style
This subfolder contains 2 files :
Style.qml -import QtQuick 2.0 QtObject { property color systemControlColor: "#B7B865" }
and qmldir -
module Style singleton Style 1.0 Style.qml
Then I attempt to import -
import Style 1.0
But this gives me an error
module "Style" is not installed
What am I missing ?
Thanks
-
I'm using a subfolder "style/Style.qml + qmldir" and in qml file just import "style", works for me.
-
@GrahamLa said in Style singleton:
My project files are contained in a folder and this has one subfolder named Style
is this folder in (one of) the qml import path? If not you need to add the path to folder containing the Style-folder to it.
Also you can put the folder (in a relative) subfolder to the qml file importing it inside the qrc file.