--===============0734620427== Content-Type: multipart/alternative; boundary="0-656858356-1103243664=:40498" Content-Transfer-Encoding: 8bit --0-656858356-1103243664=:40498 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I spent lots of time tracing execution with the debuger, and I didn't find a place in *win.cpp code which seems to be responsible. The point of my interest is now qbutton.cpp, in paintEvent function (line 880) : /*! Handles paint events for buttons. Small and typically complex buttons are painted double-buffered to reduce flicker. The actually drawing is done in the virtual functions drawButton() and drawButtonLabel(). \sa drawButton(), drawButtonLabel() */ void QButton::paintEvent( QPaintEvent *) { #ifdef Q_WS_WIN QPainter p( this ); drawButton (&p); #else QSharedDoubleBuffer buffer( this ); drawButton( buffer.painter() ); #endif } I tried to change the #ifdef in order to use the double buffering as the comments suggest, and... it works! In fact, clearing the QPainter is missing, the following code works too: #ifdef Q_WS_WIN QPainter p( this ); p.eraseRect( this->rect() ); <- added drawButton (&p); #else So I looked in qbutton.cpp from qt-x11-free-3.3.3 and found this: void QButton::paintEvent( QPaintEvent *) { QSharedDoubleBuffer buffer( this ); drawButton( buffer.painter() ); } So I am wondering where does this #ifdef Q_WS_WIN comes from ? What do you think about using the double buffer which is what is used in last Qt X11 release ? Regards. Aurelien REGAT-BARREL --------------------------------- Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail --0-656858356-1103243664=:40498 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
I spent lots of time tracing execution with the debuger, and I didn't find a place in *win.cpp code which seems to be responsible. The point of my interest is now qbutton.cpp, in paintEvent function (line 880) :
/*!
    Handles paint events for buttons. Small and typically complex
    buttons are painted double-buffered to reduce flicker. The
    actually drawing is done in the virtual functions drawButton() and
    drawButtonLabel().
    \sa drawButton(), drawButtonLabel()
*/
void QButton::paintEvent( QPaintEvent *)
{
#ifdef Q_WS_WIN
    QPainter p( this );
    drawButton (&p);
#else
    QSharedDoubleBuffer buffer( this );
    drawButton( buffer.painter() );
#endif
}
 
I tried to change the #ifdef in order to use the double buffering as the comments suggest, and... it works! In fact, clearing the QPainter is missing, the following code works too:
 
#ifdef Q_WS_WIN
    QPainter p( this );
    p.eraseRect( this->rect() );    <- added
    drawButton (&p);
#else
So I looked in qbutton.cpp from qt-x11-free-3.3.3 and found this:
 
void QButton::paintEvent( QPaintEvent *)
{
    QSharedDoubleBuffer buffer( this );
    drawButton( buffer.painter() );
}
So I am wondering where does this #ifdef Q_WS_WIN comes from ? What do you think about using the double buffer which is what is used in last Qt X11 release ?
 
Regards.


Aurelien REGAT-BARREL


Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail --0-656858356-1103243664=:40498-- --===============0734620427== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-cygwin mailing list kde-cygwin@kde.org https://mail.kde.org/mailman/listinfo/kde-cygwin --===============0734620427==--