Important: Please read the Qt Code of Conduct -

Proportion Issue for Qt High-dpi Scaling

  • Hi there:

    I have an issue about the proportion of Qt high-dpi scaling. I am using Qt 5.7.0 for Windows 64-bit (VS 2015) under a 64-bit Windows 10.

    Please refer to attached pictures - Screenshot 1 and Screenshot 2 - with details there. What can I do to solve the proportion issue? Please help.
    Screenshot 1
    Screenshot 2

    1. I just called QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); in main.cpp

    2. main.cpp is as the following:
      #include "mainwindow.h"
      #include <QApplication>

    int main(int argc, char *argv[])

    QApplication a(argc, argv);
    MainWindow w;;
    return a.exec();


    1. mainwindow.cpp is as the following:
      #include "mainwindow.h"
      #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    ui(new Ui::MainWindow)

    delete ui;

Log in to reply