qt - QML import style file from subdirectory -
i have problem importing style files subdirectory.
this concerning section in *.pro file:
qml_import_path = \ src/gui/qml/views/startview/ \ src/gui/qml/views/createlocalgameview/ \ src/gui/qml/views/ \ src/gui/qml/components/styles/ \ src/gui/qml/components/ \ src/gui/qml/js/
for example have file mytextfieldstyle.qml placed in src/gui/qml/components/styles/:
textfieldstyle { [...] }
and have file textarea.qml placed in src/gui/qml/components/:
item { [...] textfield { id: textfield style: mytextfieldstyle {} } [...] }
now error:
textarea.qml: mytextfieldstyle not type
if put mytextfieldstyle.qml in same directory textarea.qml (src/gui/qml/components/) works fine. have many components , many styles , want seperate them have better overview. there way can working?
it should enough putting @ top of file import
statement relative paths.
in example, can use import './styles'
.
as stated in comments, qml_import_path
not meant solve problem.
Comments
Post a Comment