Do not call setSizePolicy from ctor, it might call a virtual function
More specifically, it might very well call updateGeometry() Reviewed-by: Frederik Gladhorn (cherry picked from commit febdcef08f22310cbd70ec13b315f70ff8e41e83)
This commit is contained in:
parent
2e768aad98
commit
b46d7d3b91
@ -167,7 +167,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutItem *parent)
|
||||
" neither a QGraphicsWidget nor QGraphicsLayout");
|
||||
}
|
||||
}
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
|
||||
d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
|
||||
setOwnedByLayout(true);
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ QGraphicsLayout::QGraphicsLayout(QGraphicsLayoutPrivate &dd, QGraphicsLayoutItem
|
||||
" neither a QGraphicsWidget nor QGraphicsLayout");
|
||||
}
|
||||
}
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
|
||||
d_func()->sizePolicy = QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, QSizePolicy::DefaultType);
|
||||
setOwnedByLayout(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user