Hi,
With a QGraphicsView I can set the margins of the viewport with setViewportMargins (inherited from QAbstractScrollArea), but I am then unsure how to actually place widgets in those margins.
I tried both:
viewport()->layout()->addWidget( myWidget );
viewport()->layout()->addWidget( myWidget );
To copy to clipboard, switch view to plain text mode
and
layout()->addWidget( myWidget );
layout()->addWidget( myWidget );
To copy to clipboard, switch view to plain text mode
But each case results in a seg fault, which I think means the layout in both cases hasn't yet been instantiated. However I would have thought the QGraphicsView must have a layout already, in which the viewport is placed, and the viewport must have a layout for which the margins get set?
Any tips on how to add widgets into the margins is greatly appreciated 
Neil
Bookmarks