scribblearea.cpp
void ScribbleArea::resizeEvent(QResizeEvent *event)
{
    if (width() > image.width() || height() > image.height()) {
        int newWidth = qMax(width() + 128, image.width());
        int newHeight = qMax(height() + 128, image.height());
        resizeImage(&image, QSize(newWidth, newHeight));
        update();
    }
    QWidget::resizeEvent(event);
}
// Resize the image to slightly larger then the main window
// to cut down on the need to resize the image
Resize the image to slightly larger then the main window
to cut down on the need to resize the image
Resize the image to slightly larger then the main window to cut down on the need to resize the image
void ScribbleArea::resizeEvent(QResizeEvent *event)
{
    if (width() > image.width() || height() > image.height()) {
        int newWidth = qMax(width() + 128, image.width());
        int newHeight = qMax(height() + 128, image.height());
        resizeImage(&image, QSize(newWidth, newHeight));
        update();
    }
    QWidget::resizeEvent(event);
}
void ScribbleArea :: resizeEvent ( QResizeEvent * event ) { if ( width ( ) > image . width ( ) || height ( ) > image . height ( ) ) { int newWidth = qMax ( width ( ) + 128 , image . width ( ) ) ; int newHeight = qMax ( height ( ) + 128 , image . height ( ) ) ; resizeImage ( & image , QSize ( newWidth , newHeight ) ) ; update ( ) ; } QWidget :: resizeEvent ( event ) ; }
Resize the image to slightly larger then the main window
to cut down on the need to resize the image
Resize the image to slightly larger then the main window to cut down on the need to resize the image