Results 1 to 2 of 2

Thread: Draw Image into Pixmap/Image

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Draw Image into Pixmap/Image

    I have a logo image stored as a PNG file. I also have a subclassed QGLWidget which I can print or save to an image. I would like to display the logo image in a spot, like the bottom-right corner of the QGLWidget's pixmap. How do I draw the PNG file on top of the pixmap already rendered from the QGLWidget?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Draw Image into Pixmap/Image

    In the paintEvent of the QGLWidget... first call the base class paint event,, and then draw the icon at the desired position in your subclass's paintEvent.

Similar Threads

  1. pixelized png image loaded as a pixmap
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2009, 12:56
  2. Replies: 6
    Last Post: 21st September 2009, 11:55
  3. [problem]displaying image with Pixmap
    By crazy_inf in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2008, 10:49
  4. Qt 3.3.8 pixmap to/from image error
    By ksierens in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2008, 07:46
  5. Create pixmap image from string
    By Morea in forum Qt Programming
    Replies: 5
    Last Post: 17th November 2006, 17:38

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.