Hi, I am trying to rewrite a Qt3 progrom in Ot4. and I am having a problem with my resizeEvent function. In Qt3 I have
{
baseBuffer
= QPixmap( event
->size
() );
baseBuffer.
fill( QColor( 240,
240,
255 ) );
bitBlt ( &baseBuffer, 0, 0, &save );
}
void edpForm::resizeEvent( QResizeEvent* event )
{
QPixmap save( baseBuffer );
baseBuffer = QPixmap( event->size() );
baseBuffer.fill( QColor( 240, 240, 255 ) );
bitBlt ( &baseBuffer, 0, 0, &save );
}
To copy to clipboard, switch view to plain text mode
and now I get a "bitBlt" not declared in this scope. Going to the Qt3 to Qt4 documentation I find.
To reimplement painter backends one previously needed to reimplement the virtual function QPaintDevice::cmd(). This function is taken out and should is replaced with the function QPaintDevice::paintEngine() and the abstract class QPaintEngine. QPaintEngine provides virtual functions for all drawing operations that can be performed on a painter backend.
bitBlt() and copyBlt() are now only compatibility functions. Use QPainter::drawPixmap() instead.
It is possible I have missed somthing in a header file someplace to cause the error message and not the change from Qt3 to Qt4. If the latter is the case some help on the proper way to handle a resize event would be appreciated.
This is a graphic program which uses the buffer/bitBlt a great deal.
Thanks.
Bookmarks