My Image is Cropped by QPixmap when displaying img using QLabel
sylorr last edited by
Hi there, thanks for clicking into my post first.
I am intending to use a simple QLable to display my image. However, my image is way too big in size. QPixmap automatically crops it for me and display part of it. I have tried QPixmap::scale(int w, int h, Qt::IgnoreAspectRatio) but it doesn't work. Am I correct to use QLabel to implement such a simple feature? Thanks
Note: Qt 5.6, Ubuntu 16.04
Devopia53 last edited by
I have tried QPixmap::scale(int w, int h, Qt::IgnoreAspectRatio) but it doesn't work.
scaled()is right, not
QLabel::setScaledContents(true)may also be used.