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

Mihail Naydenov mlists at ymail.com
Thu Dec 9 19:54:37 CET 2010


It is hard for me to track you thoughts. What exactly are you trying to do.
"During initialization of my class", what class? 
Why not draw on paint()? All will be initialized then.


----- Original Message ----
> From: franki <franki at franki.eu.org>
> To: qt-interest <qt-interest at trolltech.com>
> Sent: Thu, December 9, 2010 6:08:45 PM
> Subject: [Qt-interest] showEvent in QGraphicsView - question about when to 
draw
> 
> 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
> _______________________________________________
> Qt-interest  mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 


      



More information about the Qt-interest-old mailing list