How to dynamically create Rectangles ?
I want to read information from a file in which is written in each line 4 points (x1,x2,y1,y2).
Now, I want to create a rectangle with this coordinates, but not in the design mode because the coordinates are not known before and they can always change.
QML can't read files. You need to write a C++ plugin for that. "Tutorial: Writing QML Extensions with C++":http://doc.qt.nokia.com/4.7-snapshot/qml-extending-tutorial-index.html
For example, you can write a model that provides coordinates and than use "Repeater":http://doc.qt.nokia.com/4.7-snapshot/qml-repeater.html to create rectangles.
Or you can create rectangle dynamicly from C++. It's up to you.
Can I also load the file into a string(list) and then operating with the string / the stringlist ?
Then, I dont need to write an algorithm to open the file ?!