I know this is resurrecting an old thread, but I wound-up here when trying to figure out why sizeHint wasn't being called when overridden in a custom QGraphicsWidget.
Someone might wind-up here, so I'll add my discovery that having called setContentsMargins at any time before layout will solve this problem.