From a694c2b0373cba38916f48b495038ff9093cc5d9 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 5 Jan 2020 14:38:39 +0800 Subject: [PATCH] fix: when copy pixmap, keep the alpha channel --- graphicsscene.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/graphicsscene.cpp b/graphicsscene.cpp index 6b6d582..c02cfff 100644 --- a/graphicsscene.cpp +++ b/graphicsscene.cpp @@ -63,6 +63,7 @@ void GraphicsScene::showGif(const QString &filepath) QPixmap GraphicsScene::renderToPixmap() { QPixmap pixmap(sceneRect().toRect().size()); + pixmap.fill(Qt::transparent); QPainter p(&pixmap); render(&p, sceneRect());