changes for portability with Qt 5.12 on Ubuntu 20.04LTS

This commit is contained in:
Axel Kohlmeyer
2023-07-31 07:04:25 -04:00
parent 0a0184221c
commit 2f159df3b7
3 changed files with 7 additions and 3 deletions

View File

@ -161,7 +161,11 @@ void ImageViewer::updateActions()
void ImageViewer::scaleImage(double factor)
{
scaleFactor *= factor;
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
#else
imageLabel->resize(scaleFactor * imageLabel->pixmap(Qt::ReturnByValue).size());
#endif
adjustScrollBar(scrollArea->horizontalScrollBar(), factor);
adjustScrollBar(scrollArea->verticalScrollBar(), factor);