Unable to load images properly using Qimage's load()
-
Use Qimage's load() to load images, print log load() and return success, but the program will get stuck in load(). If this part is removed, it will run normally
But on my compilation host, there is no such issue on the other laptop. There is this issue on a poorly performing mini host using Qt5.9.3
QImage img; img.load(pic_name); int WindowW = this->width()*0.9; int WindowH = this->height()*0.9; pic_label->setGeometry(0, 0, WindowW, WindowH); QImage scalimg = img.scaled(pic_label->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation); pic_label->setPixmap(QPixmap::fromImage(scalimg));
-
Use Qimage's load() to load images, print log load() and return success, but the program will get stuck in load(). If this part is removed, it will run normally
But on my compilation host, there is no such issue on the other laptop. There is this issue on a poorly performing mini host using Qt5.9.3
QImage img; img.load(pic_name); int WindowW = this->width()*0.9; int WindowH = this->height()*0.9; pic_label->setGeometry(0, 0, WindowW, WindowH); QImage scalimg = img.scaled(pic_label->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation); pic_label->setPixmap(QPixmap::fromImage(scalimg));
You should check the image if it is correct and can be loaded by other image viewers. A backtracce would also help here.
-
After compiling with Qt5.15.2, the images can be loaded normally, but the processing speed is slow on the mini host and runs normally on other computers
@houyawei said in Unable to load images properly using Qimage's load():
on the mini host
What is this?
-
H houyawei has marked this topic as solved on