how to manage QGraphicsScene

Ian Monroe ian at monroe.nu
Sat Jul 21 23:33:32 CEST 2007


> Option two sounds like the least work two me. Keeping the members private and
> creating the qgraphicsscene on first access should keep both memory
> comsumption and complexity (because you don't have to check for null-pointers
> in the calling code) down.
>
> Cheers, Max

Well regardless of the solution there's going to be a method in the
model (or perhaps just part of ::data) that returns the qgraphicscene,
it could be created there. The issue with the second solution is that
I'd have to iterate over all the items being added to the playlist and
create this new Playlist::Item object (even for objects that aren't
being painted).

Ian


More information about the Amarok-devel mailing list