fix: CustomDisabledIconEngine's clone() not correct

This commit is contained in:
Roy Qu 2022-02-03 21:46:53 +08:00
parent 494832220a
commit 7e2a51b65f
1 changed files with 4 additions and 1 deletions

View File

@ -20,7 +20,10 @@ void CustomDisabledIconEngine::paint(QPainter *painter, const QRect &rect, QIcon
QIconEngine *CustomDisabledIconEngine::clone() const
{
return new CustomDisabledIconEngine();
CustomDisabledIconEngine* eng = new CustomDisabledIconEngine();
eng->mPixmap = mPixmap;
eng->mDisabledPixmap = mDisabledPixmap;
return eng;
}
QPixmap CustomDisabledIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state)