From 096ff5170b78bec73ba19d2863a576abb14c6a28 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Wed, 2 Oct 2019 22:53:13 +0800 Subject: [PATCH] fix: wrong scene rect will be set for :gif: --- graphicsscene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphicsscene.cpp b/graphicsscene.cpp index 834527e..5d73245 100644 --- a/graphicsscene.cpp +++ b/graphicsscene.cpp @@ -54,6 +54,7 @@ void GraphicsScene::showGif(const QString &filepath) label->setMovie(movie); this->addWidget(label); movie->start(); - m_theThing = this->addRect(QRect(QPoint(0, 0), movie->scaledSize())); + m_theThing = this->addRect(QRect(QPoint(0, 0), label->sizeHint()), + QPen(Qt::transparent)); this->setSceneRect(m_theThing->boundingRect()); }