12-17-2012 11:40 AM
We extended ImageView in C++. It doesn't let us set the scaling method to none. We always get the log message "Invalid scaling method"
Either if we set it to none in C++ it does not work.
Or if we set it to none in QML it does not work.
All the other scaling methods work fine.
How do we make the ImageView not to scale the image?
The only solution we see is to implement the ImageView in QML which is not our preferred solution.
Solved! Go to Solution.
01-04-2013 10:36 AM
Okay, I found a really dirty workaround.
Assume we have a QByteArray containing the image data:
setScalingMethod(ScalingMethod::AspectFit); QImage qImage = QImage::fromData(imageData); setPreferredWidth(qImage.width()); setPreferredHeight(qImage.height()); setMinWidth(qImage.width()); setMinHeight(qImage.height());
03-21-2013 10:42 AM
Hi oliver.kranz, thanks for logging this issue to the developer issue tracker. It is actually a known issue that's currently under investigation.