QML don't work when I save it into resource file

Multi tool use
Multi tool use


QML don't work when I save it into resource file



I have got resource file for my program.
Structure is like this:


resources.qrc
|__ /
|__ qml
|___ Sample.qml
|___ SlabData.qml
|___ SlabImage.qml



In Sample.qml I am using SlabData, wich is stored in SlabData.qml, but it keeps writing me error:


Sample.qml


SlabData


SlabData.qml


file::/qml/Sample.qml:38:5: SlabData is not a type
SlabData{



I tried to import "./SlabData.qml, but it didn't work either.


import "./SlabData.qml



Is there any way I can use other qml file, wich is in same resource?



Thank you!



EDIT: Added example


Item {
SlabItem{anchors.fill: parent}

Rectangle {...}
}





You cannot import QML file. Sibling files are imported automatically. You should import QML module or a folder instead. Did you read Import Statements? Please provide Minimal, Complete, and Verifiable example
– folibis
Jul 2 at 13:03










By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

G9YC w,qooJd8vggHW5mQUFFpA3B1EHhr,1Bv7NWoTQt,lfFQtBTONVf2KmQy ZjSvnvHWnYI2y
T,XnHVvzuC FqzxD9LIiqJCoUD7nBEFFT7A5v,Emz 4xO,vr6Pz

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications