You are right buddy. I think seriously about boundingRect.
(I edited the code)
QRectF CompositeItem
::boundingRect() const {
FieldItem *child;
foreach(child,children)
{
rect = rect.united(child->boundingRect());
}
return rect;
}
QRectF CompositeItem::boundingRect() const
{
FieldItem *child;
QRectF rect(0,0,0,0);
foreach(child,children)
{
rect = rect.united(child->boundingRect());
}
return rect;
}
To copy to clipboard, switch view to plain text mode
I thinks its is a neat idea to unite child items boundingRects but this time
item can' t catch events like contextmenuevent, mousepressevent.
I tried to click everywhere inside boundingRect.
What may cause this?
Bookmarks