Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QImage on Clipboard, different behaviour on Windows and Mac



  • We are creating a QImage and setting the dotsPerMeterx and dotsPerMeterY values to produce a 300dpi image. This image is then placed onto the clipboard.

    On a Windows machine, when we paste this image into Word, Word allows for the dots per metre and the image comes into Word (and all other products we have tested on) correctly sized. It behaves as expected.

    On a Mac machine, when we paste an image into Word, Word pastes the image in 4.166666 times too large, which just happens to be the ratio between the Mac OS dpi of 72 and our desired 300dpi. Pasting the image into Pages also produces an image that is oversized so it seems to be something inherent to the Mac rather than just Word. It seems that, on the Mac, the dpi settings are being ignored.

    We have googled and experimented at length trying to work around this difference to no avail. ANY advice or insights would be most welcome!


  • Lifetime Qt Champion

    Hi,

    What version of Qt are you using ?
    On which version of these platforms ?
    What are the graphics specs of each ?



  • @SGaist

    Thanks for taking the time to respond.

    QT5.10, but we have seen the behaviour on earlier QT releases. Windows 10 April 2018 Release, but also seen on earlier. MacOSX High Sierra but, again, seen on earlier releases.

    We have reports of this behaviour from all of our Mac customers (thousands of users) over a long period of time. We strongly doubt that it is related to any particular release or setup. We are also "fairly" confident that it is not particularly a QT issue. Our suspicion is that it is a MacOSX issue but more than happy to be proved wrong on that front.


  • Lifetime Qt Champion

    Then can you provide a minimal compilable example that reproduces that behaviour ?

    In any case, I'd recommend taking a look at the bug reports system to see if there anything related to that matter.


Log in to reply