[Qt-interest] native painting in a QWidget on Windows

John Weeks john at wavemetrics.com
Thu Dec 30 17:36:00 CET 2010


On Dec 30, 2010, at 5:06 AM, Thiago Macieira wrote:

> On Wednesday, 29 de December de 2010 13:43:24 John Weeks wrote:
>> Thanks, Alex!
>> 
>> On Dec 29, 2010, at 1:13 PM, Malyushytsky, Alex wrote:
>>> You could try to play with widget attributes.
>>> Start with setAttribute(Qt::WA_NativeWindow);
>> 
>> Yes, I tried that. It seems that is equivalent to calling QWidget::winId().
>> 
>> Even in a window with Qt::WA_NativeWindow set, QPainter is still using the
>> raster engine, which means that all QPainter drawing is done to a bitmap
>> that is blted to the widget only after all drawing is done.
> 
> There's no "native" on Windows. So it's always raster.


Right, thanks- figured that out the hard way :)

So I take it that my round-about technique would be pretty much the only way to achieve what I need.

Out of curiosity- why is the Windows implementation done this way? Are other platforms implemented this way as well?

Regards,
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax   (503) 620-6754
email   support at WaveMetrics.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101230/1c427384/attachment.html 


More information about the Qt-interest-old mailing list