What happens behind, when i add a rectangle
Rectangle{
width:40
heigh: 40
color:"blue"
}
in a qml file?
What invokes what and a blue rectangle has been drawn?
What is the mechanism? Can you advise something to read, i couldnot find.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general:
You will get a warm belly feeling once you type QGraphicsRectItem into assistant-qt4 (the primary qt documentation assistant) and later realize that your qml code “Rectangle” is finally creating one. The Qt4 QtQuick implementation is currently a thin abstraction of QGraphicsView/QGraphicsScene. As above, the steps are the same:
These classes are exceptionally well documented, and once you understand their principle you are ready to go forward and study their evolution to QDeclarative* etc. Unfortunately the documentation of the latter is somewhat lacking in certain details, but overall very useful. Surely, there is more to it – but once your realize the QtQuick evolution originating from QGraphicsView/-Scene classes, everything else is much more logical. Then, a glimpse into the source code (where documentation was lacking) will make you feel much more oriented – as you have an idea how the parsed markup is finally converging into QGraphicsItem’s beeing created in your QGraphicsScene (QDeclarativeView,..).
Good Luck!