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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -