[Qt-interest] How to detect the graphicssystem at runtime
Uwe Rathmann
Uwe.Rathmann at tigertal.de
Tue May 31 19:42:01 CEST 2011
Giuseppe D'Angelo wrote:
>> Does someone has an idea how to find out if an application runs with
>> "native" or "raster" on X11 ?
> QPixmap pixmap(1, 1);
> qDebug() << pixmap.paintEngine()->type();
I had tried to check the paint engine of the widget, what gives a different
result than the pixmap with graphics system "raster".
AFAIR in an earlier version of Qt it was not safe to call
QPaintDevice::paintEngine() and I had to create a QPainter on this device
first to get the paint engine, but this seems to be gone with Qt 4.7 ( or my
memory is wrong ).
Thanks for the solution,
Uwe
More information about the Qt-interest-old
mailing list