Style singleton
-
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.qmlThen I attempt to import -
import Style 1.0But this gives me an error
module "Style" is not installedWhat am I missing ?
Thanks
-
I'm using a subfolder "style/Style.qml + qmldir" and in qml file just import "style", works for me.
-
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.qmlThen I attempt to import -
import Style 1.0But this gives me an error
module "Style" is not installedWhat am I missing ?
Thanks
@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.