diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-09-19 17:20:06 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-20 06:57:10 +0000 |
commit | 26db6eeff0a508d367e5b1213ca04bcdc792aa46 (patch) | |
tree | 44aac0a2ec09c9aced7bdfb7268d0e933ff63249 | |
parent | b0419a5ef12524f5f585fb42b40bf1b7918e68bf (diff) | |
download | qttools-26db6eeff0a508d367e5b1213ca04bcdc792aa46.tar.gz |
Qt Designer: Fix blurry icon in version dialog on Hi DPI screens
Fixes: QTBUG-106706
Change-Id: I104e5452f51d52c3300459bdc22a4404bafe8015
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b69a37e562d261f4a33bea1fbff1aa0ad2263577)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/designer/src/designer/versiondialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/designer/src/designer/versiondialog.cpp b/src/designer/src/designer/versiondialog.cpp index 0b470aba4..e74e4db59 100644 --- a/src/designer/src/designer/versiondialog.cpp +++ b/src/designer/src/designer/versiondialog.cpp @@ -42,7 +42,9 @@ private: VersionLabel::VersionLabel(QWidget *parent) : QLabel(parent) { - setPixmap(QPixmap(QStringLiteral(":/qt-project.org/designer/images/designer.png"))); + QPixmap pixmap(QStringLiteral(":/qt-project.org/designer/images/designer.png")); + pixmap.setDevicePixelRatio(devicePixelRatioF()); + setPixmap(pixmap); hitPoints.append(QPoint(56, 25)); hitPoints.append(QPoint(29, 55)); hitPoints.append(QPoint(56, 87)); @@ -130,8 +132,8 @@ VersionDialog::VersionDialog(QWidget *parent) { setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) | Qt::MSWindowsFixedSizeDialogHint); QGridLayout *layout = new QGridLayout(this); - VersionLabel *label = new VersionLabel; - QLabel *lbl = new QLabel; + VersionLabel *label = new VersionLabel(this); + QLabel *lbl = new QLabel(this); QString version = tr("<h3>%1</h3><br/><br/>Version %2"); version = version.arg(tr("Qt Designer")).arg(QLatin1String(QT_VERSION_STR)); version.append(tr("<br/>Qt Designer is a graphical user interface designer for Qt applications.<br/>")); @@ -143,7 +145,7 @@ VersionDialog::VersionDialog(QWidget *parent) lbl->setWordWrap(true); lbl->setOpenExternalLinks(true); - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this); connect(buttonBox , &QDialogButtonBox::rejected, this, &QDialog::reject); connect(label, &VersionLabel::triggered, this, &QDialog::accept); layout->addWidget(label, 0, 0, 1, 1); |