Results 1 to 2 of 2

Thread: QPixmap and HBITMAP

  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

    Question QPixmap and HBITMAP

    I have a pointer to a QPixmap that I edit by clicking on the mouse. I am trying to overlay this on top of my DirectShow video and have been looking at using DirectShow's VMR to handle displaying the overlay. I have discovered I should be able to achieve this by using a HBITMAP object. My question then, is there a way to convert a QPixmap to a HBITMAP. I know I can set a QBitmap to a QPixmap by either declaring that in the constructor or when I modify the QPixmap just set the QBitmap = QPixmap. I use the QPixmap so I can use a QPainter to modify the pixmap. By setting the QBitmap equal to the QPixmap, is it then possible to convert this to a HBITMAP if it's not possible to go straight from the QPixmap to the HBITMAP? Thanks!

  2. #2
    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

    Cool Re: QPixmap and HBITMAP

    I did a little looking around the docs some more and realized I overlooked a QPixmap function called toWinHBITMAP( ). I will give this a shot and post how the results worked out. Thanks!

Similar Threads

  1. QPixmap -> HICON trouble.
    By krivenok in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2006, 16:51

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.