Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

QtConcurrent scaling image

$
0
0
Hello everyone. Help make out what the problem is. He took an example of Image Scaling working: QImage scale (const QString & imageFileName) {      QImage image (imageFileName);      return image.scaled (QSize (imageSize, imageSize), Qt :: IgnoreAspectRatio, Qt :: SmoothTransformation); }   void Images :: open () { ...      QStringList files = QFileDialog :: getOpenFileNames (this, tr ("Select Images"),                              QStandardPaths :: writableLocation (QStandardPaths :: PicturesLocation),                              "*. jpg *. png");       ...      imageScaling-> setFuture (QtConcurrent :: mapped (files, scale)); ... } But if you do so. falls with error QImage scale (const QString & imageFileName) {      QImage image (imageFileName);      return image.scaled (QSize (imageSize, imageSize), Qt :: IgnoreAspectRatio, Qt :: SmoothTransformation); }   void Images :: open () { ...      QStringList files;      files.append (QString ("path to file"));      files.append (QString ("path to file2"));      files.append (QString ("etc"));       ...      imageScaling-> setFuture (QtConcurrent :: mapped (files, scale)); ... } if you add in QStringList path to a single file, it works too

Viewing all articles
Browse latest Browse all 22112

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>