• Dmitry Suzdalev's avatar
    At last I found a way how to distinguish resizeEvent() that is · ed992344
    Dmitry Suzdalev authored
    called when widget is shown from resizeEvent() called when widget
    is hidden!
    It really matters when you re-render complex svg on each resize and
    when resizeEvent() comes from some Qt internal magic (layouting etc).
    Why re-render if widget isn't visible and this resizeEvent() for sure
    won't be last in sequence?
    
    Now I know the True (tm)
    
    Many thanks to aseigo & JohnFlux :-)
    
    You just need to check what
    QWidget::testAttribute( Qt::WA_PendingResizeEvent ) returns.
    
    If this is false, then paint! :-)
    
    One step further on the way to faster startup times.
    
    Hmm... Or am I only one who just discovered this? ;-)
    
    svn path=/trunk/KDE/kdegames/klines/; revision=670136
    ed992344
scene.h 6.56 KB