Results 1 to 3 of 3

Thread: QLabel as an image.

  1. #1
    Join Date
    Apr 2009
    Posts
    46
    Thanks
    4
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QLabel as an image.

    Hi, I want in my MainWindow have an image and depending on user actions, it will change to different ones. So, I put in designer a QLabel and set in QLabels pixmap my image. Now when I run my program the QLabel works (tool tip is poping up), but the image isn't drawn. Any ideas what I need to do?

  2. #2
    Join Date
    Mar 2009
    Posts
    98
    Thanks
    3
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLabel as an image.

    Look at Image Viewer Example http://doc.trolltech.com/4.2/widgets-imageviewer.html.
    It works?

  3. The following user says thank you to PaceyIV for this useful post:

    RSX (4th April 2009)

  4. #3
    Join Date
    Apr 2009
    Posts
    46
    Thanks
    4
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLabel as an image.

    Well, yes. If I set the pixmap in constructor, my image is drawn. I guess I gotta do it this way.

Similar Threads

  1. Replies: 7
    Last Post: 13th August 2008, 18:27
  2. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  3. Show Image on a QLabel
    By ^NyAw^ in forum Newbie
    Replies: 11
    Last Post: 15th April 2008, 15:45
  4. Replies: 13
    Last Post: 18th February 2008, 00:20
  5. Set the image at the center in QLabel?
    By vishal.chauhan in forum Qt Programming
    Replies: 5
    Last Post: 20th August 2007, 14:07

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.