Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7791005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:45:25+00:00 2026-06-01T21:45:25+00:00

What happens behind, when i add a rectangle Rectangle{ width:40 heigh: 40 color:blue }

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:45:26+00:00Added an answer on June 1, 2026 at 9:45 pm

    In general:

     -> parse Qml code 
     -> create QDeclarativeItems
     -> add to QDeclerativeView's scene
     -> call items standard slot like onCreated()
     -> call the QDeclarativeItems paint method etc     
    

    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:

     -> create QGraphicsItems
     -> add to QGraphicsView's scene 
     -> call QGraphicsItem paint method etc
    

    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!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could you explain, what happens behind the scene? Transaction management when using this template
How is the bind operator implemented in JavaFX? What happens behind the scenes? Does
I'm clear on the usage of MemoryBarrier, but not on what happens behind the
What happens to the name/value pairs stored inside a form's resx file? Are they
What happens on a Windows box once you add more drives than can fit
I just wanted to know what happens behind my program when I declare and
Simple question: How do I detect that the onscreen keyboard has been displayed on
Can anyone please explain to me what happens behind the scenes when you use
I am trying to understand what happens behind the scenes of a grails url
If user passes a primitive type argument to println() , what exactly happens behind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.