Why doesn't this code work? I'd like to create the wet floor effect with Qt and I am painting on a QWidget.
Code:
painter.save(); reflectionGradient.setFinalStop(0, pixmap.height()); painter.fillRect(pixmap.rect(), reflectionGradient); painter.drawPixmap(zero, pixmap); painter.restore();
Added after 16 minutes:
I think I have the answer:
int QPaintDevice::depth () const
returns 24, hence no destination alpha. Is it possible to force destination alpha to 32 somehow, or work around this limitation, without creating a temporary QPixmap or QImage.
