Clear QPixmapCache if style/palette changes (Qt should do this really)

This commit is contained in:
baldurk
2017-07-24 17:19:25 +01:00
parent cd15947f47
commit 1cda979d8f
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -28,6 +28,7 @@
#include <QFileInfo>
#include <QMimeData>
#include <QMouseEvent>
#include <QPixmapCache>
#include <QProgressBar>
#include <QProgressDialog>
#include <QToolButton>
@@ -1690,6 +1691,12 @@ void MainWindow::closeEvent(QCloseEvent *event)
SaveLayout(0);
}
void MainWindow::changeEvent(QEvent *event)
{
if(event->type() == QEvent::PaletteChange || event->type() == QEvent::StyleChange)
QPixmapCache::clear();
}
QString MainWindow::dragFilename(const QMimeData *mimeData)
{
if(mimeData->hasUrls())