Subclass of QGraphicsLayoutItem for stretchers?
The specializations of QGraphicsLayout (e.g. QGraphicsLinearLayout) include an开发者_如何学编程 insertStretch method.
What kind of object do QGraphicsLinearLayout::insertStretch method insert in the list of items managed by the layout? Better asked: what type of object is returned by QGraphicsLayout::itemAt method when called for a stretch position?
I've never investigated this, so I don't know, but if you are truly curious, you could ask for an object at that position. Assuming it doesn't return NULL
, you could then work your way through the meta information and find out quite a bit of information about it.
I wouldn't be too surprised, however, if it were a stock QWidget
(empty, drawing nothing).
精彩评论