Results 1 to 2 of 2

Thread: setting an image.jpg in a QWidget

  1. #1
    Join Date
    Jan 2006
    Location
    Riverside, Rhode Island, USA
    Posts
    245
    Thanks
    52
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default setting an image.jpg in a QWidget

    Hi, I'm running Ubuntu.8.10. and Qt-4.4.

    I have a QWidget and I want to display a "jpg" in it.
    I don't want to do anything with the image It is just for the program user's information.

    The program I'm writing has no out put to the QWidget. There are no graphic functions.

    I just want a simple commaned to place the image in the window.

    Thanks

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: setting an image.jpg in a QWidget

    Replace QWidget with QLabel and use QLabel::setPixmap().
    J-P Nurmi

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

    impeteperry (7th February 2009)

Similar Threads

  1. Replies: 0
    Last Post: 11th November 2008, 15:36
  2. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2008, 23:45
  3. Error in put one QWidget in another QWidget
    By xjtu in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2008, 16:05
  4. setting a custom QStyle on a QWidget doesn't work
    By JimDaniel in forum Qt Programming
    Replies: 9
    Last Post: 11th January 2008, 22:03
  5. Setting window icon on derived QWidget
    By steg90 in forum Qt Programming
    Replies: 5
    Last Post: 16th July 2007, 11:21

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.