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

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

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

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

+3
source share
1 answer

- . AFAIK Qt, . Qt , .

- .

Qt Win/MFC, Qt HDC MFC. . , , .

, QWindows MFC MFC Qt. , .

QImage.scanLine(0) , Windows. , scanline, .

+4

Source: https://habr.com/ru/post/1747485/


All Articles