diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2019-09-12 12:03:17 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-03-30 08:43:02 +0100 |
commit | c3a4d3608245c5614fcaf95bbe37f2300bbac4cb (patch) | |
tree | 2547ab0db15e17971242e6f4c8054b0e00a69f31 /examples/widgets/widgets | |
parent | b61ea367a5f8d07afda36b49b039b2375142d7f4 (diff) |
High-DPI: Remove usages of Qt::AA_UseHighDpiPixmaps
Remove usages of Qt::AA_UseHighDpiPixmaps from examples/.
This flag is now on by default, and can't be disabled.
Task-number: QTBUG-83092
Change-Id: Ie28622f816da2fe28d4ab272d45ea20bd051d5f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/widgets')
-rw-r--r-- | examples/widgets/widgets/icons/main.cpp | 6 | ||||
-rw-r--r-- | examples/widgets/widgets/icons/mainwindow.cpp | 10 | ||||
-rw-r--r-- | examples/widgets/widgets/icons/mainwindow.h | 1 |
3 files changed, 0 insertions, 17 deletions
diff --git a/examples/widgets/widgets/icons/main.cpp b/examples/widgets/widgets/icons/main.cpp index 632795c18c..aff2d2013e 100644 --- a/examples/widgets/widgets/icons/main.cpp +++ b/examples/widgets/widgets/icons/main.cpp @@ -64,15 +64,9 @@ int main(int argc, char *argv[]) commandLineParser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); commandLineParser.addHelpOption(); commandLineParser.addVersionOption(); - QCommandLineOption noHighDpiPixmapOption("no-highdpi-pixmaps", - "Disable High DPI image loading (Qt::AA_UseHighDpiPixmaps)"); - commandLineParser.addOption(noHighDpiPixmapOption); commandLineParser.addPositionalArgument(MainWindow::tr("[file]"), MainWindow::tr("Icon file(s) to open.")); commandLineParser.process(QCoreApplication::arguments()); - if (!commandLineParser.isSet(noHighDpiPixmapOption)) - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); - MainWindow mainWin; if (!commandLineParser.positionalArguments().isEmpty()) mainWin.loadImages(commandLineParser.positionalArguments()); diff --git a/examples/widgets/widgets/icons/mainwindow.cpp b/examples/widgets/widgets/icons/mainwindow.cpp index aa5ed852fd..bd14bff518 100644 --- a/examples/widgets/widgets/icons/mainwindow.cpp +++ b/examples/widgets/widgets/icons/mainwindow.cpp @@ -320,12 +320,6 @@ void MainWindow::loadImages(const QStringList &fileNames) } } -void MainWindow::useHighDpiPixmapsChanged(int checkState) -{ - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, checkState == Qt::Checked); - changeIcon(); -} - //! [20] void MainWindow::removeAllImages() { @@ -444,10 +438,6 @@ QWidget *MainWindow::createHighDpiIconSizeGroupBox() screenNameLabel = new QLabel(highDpiGroupBox); layout->addRow(tr("Screen:"), screenNameLabel); layout->addRow(tr("Device pixel ratio:"), devicePixelRatioLabel); - QCheckBox *highDpiPixmapsCheckBox = new QCheckBox(QLatin1String("Qt::AA_UseHighDpiPixmaps")); - highDpiPixmapsCheckBox->setChecked(QCoreApplication::testAttribute(Qt::AA_UseHighDpiPixmaps)); - connect(highDpiPixmapsCheckBox, &QCheckBox::stateChanged, this, &MainWindow::useHighDpiPixmapsChanged); - layout->addRow(highDpiPixmapsCheckBox); return highDpiGroupBox; } diff --git a/examples/widgets/widgets/icons/mainwindow.h b/examples/widgets/widgets/icons/mainwindow.h index 9250711ecc..cd77dae8e8 100644 --- a/examples/widgets/widgets/icons/mainwindow.h +++ b/examples/widgets/widgets/icons/mainwindow.h @@ -88,7 +88,6 @@ private slots: void addSampleImages(); void addOtherImages(); void removeAllImages(); - void useHighDpiPixmapsChanged(int checkState); void screenChanged(); private: |