As I said, if you run the program as a regular application (which it seems you do) then the images directory should be placed in the current working directory of where the program is executed. If you are using Creator then it is probably the build directory, which you can check in the project build settings.
This is so weird. How this http://qmlbook.org/ch01/index.html could be an easy introducing tutorial if such an annoying case is not explained?
From what I have read, QT Quick should be a quick and easy way to create application so why adding images is hindered in such oldschool way? :| I don't understand it.
Whould you or anyone else here be so kind to write a step by step explanation what user should do to make this example working?
Whoever wrote that online-book should provide such instructions not leaving a beginner with nothing..
Last edited by pabloj; 31st July 2014 at 15:29.
Using Qt Quick project istead of Qt Quick Application I have this error now:
QML Image: Invalid image data: file:///D:/QTProjects/untitled/images/background.png
Ok got it now. Thank you Wysota.
However there still remains the question what is an easy way to add image files to "Qt Quick Application" project.
Last edited by pabloj; 31st July 2014 at 16:01.
The easy way is to use Qt Resource System or paths relative to a known path.
Ok so. But QT Quick team really should make it possible to drag and drop resource files into the Design interface like more complicated Eclipse supports it.
It has to be a synonym of Making Things Easy and Quick.
But maybe I just overreacted by being used to other framework so far. Will stick to this forum during my learning curve :-)
Here: http://s11.postimg.org/bhl8kvggz/here.png
It would be handy to have possibility of creating resource directories and drag n drop they there.
Bookmarks