I know this is a very specific question related to C ++ and Qt, but maybe someone can help me, anyway ...
See the code below: I want to display the image in the scroll pane. The viewport view port must have a specific initial size. This means that if the image size is larger than the initial viewport size, scrollbars will be visible, otherwise not.
QImage image( ":/test.png" );
QLabel *label = new QLabel( this );
label->setPixmap( image.toPixmap() );
QScollArea *area = new QScrollArea( this );
area->setWidget( label );
area->setViewPortSize( QSize( 300, 300 ) );
It should be possible to resize the entire application so that the view port gets a different size than the original one.
, , . Qt, -, , .
area->setMinimumSize( QSize( 300, 300 ) );
, 300x300.
?