Hi,

The Qt app that I inherited at work has another problem. It creates a QPixmap from a QByteArray, and half of the time the QPixmap is null. The QByteArray is known good, and, the other half of the time, displays perfectly well.

Tracing through the code I found out that in qpixmap_win.cpp, the call to CreateCompatibleBitmap in QPixmap::init fails because the device context returned by qt_display_dc() is bad.

Is this a known issue? Can I force Qt to call GetDC somehow, or is there a better way to handle this?


Thanks!
Jim Brown