Skip to content
  • 0 Votes
    15 Posts
    14k Views
    V
    Found the proper option: QT_ENABLE_HIGHDPI_SCALING=0.
  • Shapes of control are shrinked on 4k displays d

    Solved General and Desktop dpi awareness
    13
    0 Votes
    13 Posts
    2k Views
    Pavel_47P
    Yes ! Works. Thanks int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
  • 0 Votes
    4 Posts
    2k Views
    R
    @johngod Thank you so much, you're right Screen.pixelDensity would be the complete solution if it was in qml, sifting trough the qt source i was able that it was derived from: double pixelpermm = QGuiApplication::primaryScreen()->physicalDotsPerInch() / 25.4 //physicalDotsPerInchX() & physicalDotsPerInchY() also exist and it seems to be correct on both my iPhone & iPad quite wel (better than all other ways I found so far) @Lorenz thanks, but for the time being I want to stick to Qt as it is a paid sdk as soon as you go commercial
  • Ui wrong size when multiple dpi settings

    Unsolved General and Desktop multiple dpi dpi awareness
    7
    1 Votes
    7 Posts
    4k Views
    fra87F
    Ok, did some tests and it seems that setting the windows:dpiawareness to 0 or 1 fixes the problem. But... The problem is, the form is much more readable with the scaling at 2, since it is almost the same size on both monitors. The problem is that while the font size increases, the local sizes don't. And so the labels are cropped. In my opinion, a much better scaling would be to increase also the linear sizes, so that the whole window has almost the same size on both monitors. I don't know if I could explain well my opinion...