Skip to content
QtWS25 Last Chance
  • devicePixelRatioF not set under macOS

    Unsolved General and Desktop hdpi macos devicepixelrati
    3
    0 Votes
    3 Posts
    639 Views
    dporobicD
    Well, the one coming from the QScreen doesn't seem to be correct either. I've got the QScreen from QApplication::primaryScreen() and see following: QScreen devicePixelRatio: 1 QScreen logicalDotsPerInch: 72 QScreen logicalDotsPerInchX: 72 QScreen logicalDotsPerInchY: 72 QScreen physicalDotsPerInch: 113.5 QScreen physicalDotsPerInchX: 113.5 QScreen physicalDotsPerInchY: 113.5 According to my user the DPI he should have 227 DPI: "13-inch MacBook Pro models introduced in late 2012 or later. Native resolution: 2560 x 1600 at 227 pixels per inch. Support for millions of colors."
  • Detect changing devicePixelRatio

    General and Desktop retina devicepixelrati
    7
    0 Votes
    7 Posts
    10k Views
    I
    @fxxxx you should set attribute for your main window: setAttribute(Qt::WA_NativeWindow); but it causes optimization problems, because it is legacy feature. anyway, it will solve your problem, and windowHandle() should return valid pointer, and will emit signal screenChanged().