+ Reply to Thread
Results 1 to 2 of 2

Thread: Image not showing in Qlabel after compiling

  1. #1
    Join Date
    Jun 2018
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Red face Image not showing in Qlabel after compiling

    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.TIM图片20180613103409.jpgTIM图片20180613103554.jpg

  2. #2
    Join Date
    Jun 2018
    Posts
    6
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Image not showing in Qlabel after compiling

    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

+ Reply to Thread

Similar Threads

  1. geting QLabel text ontop of other QLabel displaying image
    By krystosan in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2013, 17:35
  2. Qt 4.8: QLabel not showing SVG, QButton does
    By oliverg in forum Installation and Deployment
    Replies: 1
    Last Post: 30th April 2012, 08:42
  3. Image not appearing in Qlabel after compiling
    By cheyanne in forum Newbie
    Replies: 10
    Last Post: 11th October 2011, 05:46
  4. QLabel not showing
    By MarkoSan in forum Qt Programming
    Replies: 1
    Last Post: 14th April 2008, 21:58
  5. Replies: 3
    Last Post: 14th March 2007, 08:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts