How can I load an image?
-
I am in QtCreator 3.5.1 open source and I cannot open an image into the MainForm.ui.qml. I placed the image in the window by using the QtCreator Designer... I get the error:
QML Image: Cannot open: qrc:/horizontalpercentbarseries-icon.png
What could be happening?
Thanks
Juan -
I am in QtCreator 3.5.1 open source and I cannot open an image into the MainForm.ui.qml. I placed the image in the window by using the QtCreator Designer... I get the error:
QML Image: Cannot open: qrc:/horizontalpercentbarseries-icon.png
What could be happening?
Thanks
Juan@jdent said:
I am in QtCreator 3.5.1 open source and I cannot open an image into the MainForm.ui.qml. I placed the image in the window by using the QtCreator Designer... I get the error:
QML Image: Cannot open: qrc:/horizontalpercentbarseries-icon.png
What could be happening?
Thanks
JuanHi Juan,
This is the way I used:
1- Open your project in Qt creator IDE and switch to the Projects mode.
2- Right click on the MainForm.ui.qml and click on Show in Explorer. The Windows explorer opens (I assume you are using a Windows machine).
3- Copy your image and paste it into that window.
4- Get back to your IDE and double click on MainForm.ui.qml. It takes you to IDE Designer.
5- Go to Library mode and then click on Resources. Your image is there! Drag and drop it into your main window.
Hope this helps. :-) -