I\'m working on program which shows user some picture that is selected by him. But there is a problem because I would like to fit this picture in QGraphicsView\'s frame and
You should handle resize event, I guess it's the way it's meant to be played:
bool YourDialog::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::Show){
ui->conceptView->fitInView(conceptScene->sceneRect(), Qt::KeepAspectRatio);
}
if (event->type() == QEvent::Resize){
ui->conceptView->fitInView(conceptScene->sceneRect(), Qt::KeepAspectRatio);
}
}