Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
6.1.0 Beta2
-
None
Description
I've stuck into this bug when was working with image component wrapped in item that was in a separate module. To specify path for an icon i made url property.
If i launch my application with qrc resources, qml for some reason thinks that i set url directly in my component, not from main file.
To clarify the problem, these are the minimal steps to reproduce the bug:
1) Create qt quick empty application
2) Create a qml file in a new folder
3) This file should contain
import QtQuick 2.15 import QtQuick.Controls 2.15 Item { required property url iconPath Image { source: iconPath } }
4) Import folder in main qml file and create an instance of created file
5) Provide a relative path to an icon(i saved it in the same folder as main file)
If i set iconPath to "icon.png" from main file qml gives me this error:
QML Image: Cannot open: qrc:/components/icon.png
But logically path should be qrc:/icon.png/ and if i set iconPath to "../icon.png" everything works.
I've not seen this bug in 5.15.2
Attachments
Issue Links
- is duplicated by
-
QTBUG-95587 icon.source of Control is not resolved relative to user code
- Closed
- relates to
-
QTBUG-95587 icon.source of Control is not resolved relative to user code
- Closed