diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index bbe8a84..7a7326d 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -56,11 +57,12 @@ MainWindow::MainWindow(QWidget *parent) this->setWindowIcon(QIcon(":/icons/app-icon.svg")); this->setMouseTracking(true); - m_pm->setAutoLoadFilterSuffix({ - "*.jpg", "*.jpeg", "*.jfif", - "*.png", "*.gif", "*.svg", "*.bmp", "*.webp", - "*.tif", "*.tiff" - }); + + QStringList formatFilters; + for (const QByteArray &item : QImageReader::supportedImageFormats()) { + formatFilters.append(QStringLiteral("*.") % QString::fromLocal8Bit(item)); + } + m_pm->setAutoLoadFilterSuffix(formatFilters); m_fadeOutAnimation = new QPropertyAnimation(this, "windowOpacity"); m_fadeOutAnimation->setDuration(300);