Use High DPI pixmaps in prominent examples and tests

Set AA_UseHighDpiPixmaps.

Task-number: QTBUG-52622
Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Friedemann Kleint 2019-03-13 08:34:01 +01:00
parent a1808c5dbe
commit 50f3f8f6bb
6 changed files with 13 additions and 0 deletions

View File

@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(systray);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
if (!QSystemTrayIcon::isSystemTrayAvailable()) {

View File

@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(classwizard);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
#ifndef QT_NO_TRANSLATION

View File

@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(licensewizard);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
#ifndef QT_NO_TRANSLATION

View File

@ -59,6 +59,7 @@
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));

View File

@ -123,6 +123,8 @@ QWizardPage *createConclusionPage()
int main(int argc, char *argv[])
//! [9] //! [11]
{
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
#ifndef QT_NO_TRANSLATION

View File

@ -126,6 +126,10 @@ void MainWindow::aboutDialog()
int main(int argc, char *argv[])
{
#if QT_VERSION >= 0x050600
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
for (int a = 1; a < argc; ++a) {
if (!qstrcmp(argv[a], "-n")) {
qDebug("AA_DontUseNativeDialogs");