QCocoaBackingStore: Initialize non-opaque images with transparent color
In particular, this is needed when a QWidget has WA_TranslucentBackground set and nobody is painting anything behind it (except maybe some native view). Change-Id: Ib1f0714f85fa7eeced527617ecd09bb2ed6ddfc9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
c533e80e31
commit
79fc0ff67a
@ -77,6 +77,8 @@ QPaintDevice *QCocoaBackingStore::paintDevice()
|
||||
? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32;
|
||||
m_qImage = QImage(m_requestedSize * scaleFactor, format);
|
||||
m_qImage.setDevicePixelRatio(scaleFactor);
|
||||
if (format == QImage::Format_ARGB32_Premultiplied)
|
||||
m_qImage.fill(Qt::transparent);
|
||||
}
|
||||
return &m_qImage;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user