Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
Qt.resolvedUrl() has become important in Qt 6: https://doc.qt.io/qt-6/qml-changes-qt6.html#url-resolution
However, there are very few examples of it being used: https://www.google.com/search?q=site:doc.qt.io/qt-6/+"resolvedurl"
Suggestion
Use Qt.resolvedUrl() in more places where it makes sense, so that users see them in action more often.
Example
One candidate is https://doc.qt.io/qt-6/qml-qt-labs-platform-systemtrayicon.html which currently uses absolute paths for icon.source
Reasons for candidacy:
- We want to encourage users to keep *.qml files and their assets as resources within the same QML module, and use relative paths
- However, SystemTrayIcon.icon.source will fail to load a relative path that's not processed by Qt.resolvedUrl()
(Simple test code for SystemTrayIcon at QTBUG-118844)