diff options
-rw-r--r-- | src/gui/image/qpixmap_x11.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 6cde898..92a7e7d 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1252,8 +1252,11 @@ void QX11PixmapData::release() QPixmap QX11PixmapData::alphaChannel() const { - if (!hasAlphaChannel()) - return QPixmap(); + if (!hasAlphaChannel()) { + QPixmap pm(w, h); + pm.fill(Qt::white); + return pm; + } QImage im(toImage()); return QPixmap::fromImage(im.alphaChannel(), Qt::OrderedDither); } |