[Qt-interest] showEvent in QGraphicsView - question about when to draw

franki franki at franki.eu.org
Thu Dec 9 17:08:45 CET 2010


Hello,

I had a problem determinig size of QGraphicsScene, and from what I had read so 
far, size of QGraphicsView should be determined in showEvent because before 
this event happend geometry has some bogus data. 
So I did it that way, but show event is comming late, far after class itself 
had been initialized. During initialization of my class, I used to draw an 
items inside scene, but now when showEvent is comming late what should I do? 
eg. Send a signal from inside subclassed QGraphicsView, which triger some 
function in base class to start drawing items?
Is that a right way, or are there some other options?

best regards
Marek



More information about the Qt-interest-old mailing list