source: keyword not working in Linux
-
I have a strange problem with QML.
I am following a course, so copying, typing code from a book.
The issue I have is loading an image from a resource file using the following:
Image{
x: y: width: height (as required)
source: "qrc:/file.png"
}
This does not work. I can load a file from disk, load a file from the internet without problems, just not from the resource file.
This problem is only on Linux Mint using Qt 6.5.1. It also happened with Qt 6.4.3 before the upgrade
I have created the same file on my MacBook using Qt 6.1.3 and it all works fine.
Using Qt and creating a C++ program, I can load images from a resource file on any platform. This just sems to be a QML / Linux issue. -
I have a strange problem with QML.
I am following a course, so copying, typing code from a book.
The issue I have is loading an image from a resource file using the following:
Image{
x: y: width: height (as required)
source: "qrc:/file.png"
}
This does not work. I can load a file from disk, load a file from the internet without problems, just not from the resource file.
This problem is only on Linux Mint using Qt 6.5.1. It also happened with Qt 6.4.3 before the upgrade
I have created the same file on my MacBook using Qt 6.1.3 and it all works fine.
Using Qt and creating a C++ program, I can load images from a resource file on any platform. This just sems to be a QML / Linux issue. -
C Colins2 has marked this topic as solved on