QGraphicsView fitInView doesn't do anything on restore (down)
-
Silly question, did you check that resizeEvent is properly called when you click the restore button ?
-
Silly question, did you check that resizeEvent is properly called when you click the restore button ?
-
Which version of Qt are you using ?
On which version of Windows ?
Can you provide a minimal compilable example that shows this behaviour ? -
Which version of Qt are you using ?
On which version of Windows ?
Can you provide a minimal compilable example that shows this behaviour ? -
Just for the sake of testing, what happens if you trigger a single shot QTimer in the resizeEvent to trigger the fitInView ?
-
Just for the sake of testing, what happens if you trigger a single shot QTimer in the resizeEvent to trigger the fitInView ?
Hi @SGaist, not sure what you meant by that, but I've got this:
QTimer timer; timer.singleShot(1000, this, SLOT(QResizeEvent)); ui->graphicsView_LeftHand->fitInView(svgLeft, Qt::KeepAspectRatio);And it prints:
QObject::connect: Parentheses expected, slot MainWindow::QResizeEvent QObject::connect: (receiver name: 'MainWindow') -
Hi @SGaist, not sure what you meant by that, but I've got this:
QTimer timer; timer.singleShot(1000, this, SLOT(QResizeEvent)); ui->graphicsView_LeftHand->fitInView(svgLeft, Qt::KeepAspectRatio);And it prints:
QObject::connect: Parentheses expected, slot MainWindow::QResizeEvent QObject::connect: (receiver name: 'MainWindow') -
-
-
QTimer::singleShot is a static function so there's no need to create an instance for it.