Googling suggests that it should.
But the dragdroprobot example implementation (on the parent Robot object) suggests not:
QRectF Robot::boundingRect() const
{
return QRectF();
}
Which is correct, or is there something more subtle going on?
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.
Child items are painted directly by the scene not by the parent, and according to the documentation about
boundingRect():So, if there is no drawing to do in the parent, there is no need to return a non-null bounding rectangle, even if the parent has child items.
And if there is some drawing in the parent, it only needs to contain its own bounding rectangle.