PDA

View Full Version : Image not showing in Qlabel after compiling



worm_wang
13th June 2018, 03:38
I'm trying to display an image in Qt from using the label,but the image just cannot showing after compiling. This is what I've done here;
1.I've added a label(in designer,not the .cpp file),and added an image in the label.
2.I did not add the image as a source,and directly add a image.

ps. I'm A CHINESE,so if feel wired about my words.......forgive me.;)1285912860

superpomax
13th June 2018, 15:19
You should create a ressource containing your image to add image, it is safer and will prevent some error.
Here's the documentation : http://doc.qt.io/qt-5/resources.html