@MarkoSan Following are the 2 ways to do it correctly,
If loading main.qml from resource (i.e qrc)
for eg. engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
You will need to add the complete path so that the main.qml file in qrc is able to find it. For eg.
import "file:///home/someusername/gui/delegates" //import using complete path
UePeopleItemDelegate { //using the loaded Component
}
If loading main.qml directly i.e from some local path
for eg. engine.load(QUrl(QStringLiteral("main.qml"))). Note no qrc
Here you can use the relative path in main.qml
import "./gui/delegates" //import using relative path
UePeopleItemDelegate { //using the loaded Component
}
Assuming the directory gui is present in same location that of main.qml as we have used "."