Can I draw Qt objects directly to Win32 DC (Device Context)?

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-05-28T05:29:51Z Indexed on 2010/05/29 13:02 UTC
Read the original article Hit count: 524

Filed under:
|
|
|

I can draw Qt objects to an QImage and then draw the image to HDC or CDC. This may hurt our application's performance. It would be great if I can draw Qt objects directly to Win32 HDC or MFC CDC. I expect that there is a class, say QWin32Image for clear, then I can use it in this way:

QWin32Image image(hdc, 100, 100, Format_ARGB32_Premultiplied);
QPainter painter(&image);
painter.drawText(....);

Is it possible for my thought? Or is there a better way to do that?

© Stack Overflow or respective owner

Related posts about qt

Related posts about mfc