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++ [doc.qt.nokia.com]
For example, you can write a model that provides coordinates and than use Repeater [doc.qt.nokia.com] to create rectangles.
Or you can create rectangle dynamicly from C++. It’s up to you.