New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #36410 (reopened enhancement)

Opened 19 months ago

Last modified 14 months ago

Qt applications are blurry on MBP Retina

Reported by: mail.pourri@… Owned by: michaelld@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign@…, eborisch@…
Port: qt4-mac

Description

The applications using Qt (all KDE apps) are not rendering correctly on a MacBookPro with Retina screen. The text is blurry like if it was upsized with a very bad filter.

Change History

comment:1 Changed 19 months ago by macsforever2000@…

  • Keywords qt kde retina blurry removed
  • Owner changed from macports-tickets@… to michaelld@…
  • Version 2.1.2 deleted
  • Port changed from qt4 to qt4-mac

comment:2 Changed 19 months ago by michaelld@…

OK ... is this also the case with other ports that use qt4-mac for graphics, such as stellarium? What I'm wondering is whether this is a Qt4.8 issue, and thus their problem, or something specific to qt4-mac and this my problem. stellarium is a good example, because you can download a pre-compiled binary for it from their website (which uses the Qt project's pre-compiled libraries), or you can install it from source in MacPorts which uses qt4-mac. If both of these perform the same, then my vote is that it is a Qt4.8 issue; if they are different, well, that's another issue. Or, is it KDE specific maybe?

comment:3 Changed 19 months ago by mail.pourri@…

It's the same with the Stellarium binary on their website. So I guess it's a Qt issue that needs sorting on the Digia's side.

comment:4 Changed 19 months ago by michaelld@…

  • Status changed from new to closed
  • Resolution set to invalid

OK; thanks for reporting back. I'd recommend you heading to Digia's website, searching for a ticket about this issue, and if you can't find one then opening one. I'm closing this ticket as "invalid" since it's beyond my scope as a MacPorts developer.

comment:5 Changed 17 months ago by nils.carlson@…

  • Status changed from closed to reopened
  • Resolution invalid deleted

This can in fact be fixed (mostly, not icons and stuff) on the macports side. I did it on my wifes macbook pro after a bunch of reading on digia's webpage. The problem is that the .app Info.plist must contain the following lines under the <dict> tag:

        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
        <key>NSHighResolutionCapable</key>
        <true/>

It is possible to add these in an existing .app dir and then make a copy (triggering mac os to do some caching I'm guessing) in order to fix these. I fixed it for spyder by opening the /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist, adding the lintes

like so (a little context included):

<dict>(context)
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
        <key>NSHighResolutionCapable</key>
       <true/>
       <key>CFBundleDevelopmentRegion</key>(context)

making a copy (in the finder by dragging, don't know if cp -r will work) and then renaming the original to python.app to python.app.old in the finder and renaming the copy to python.app . Starting spyder (a pyqt application) from the terminal now launches it in high-res.

So just fix all the Info.plist's and this will fix most things...

A link to the relevant discussions on the qt-project: https://bugreports.qt-project.org/browse/QTBUG-23870

Last edited 14 months ago by ryandesign@… (previous) (diff)

comment:6 follow-ups: ↓ 7 ↓ 8 Changed 17 months ago by michaelld@…

Thanks for the info. As I do not have a retina Mac, I really cannot test any change I make. And, reviewing that bug report it seems that they are not yet in agreement as to what change(s) to make, not exactly. So, I'm going to wait until they fix it and then I can pop in a temporary patch to qt4-mac using their changes. I try to track Qt fixes, but if i miss it please post here that the ticket was fixed.

comment:7 in reply to: ↑ 6 Changed 17 months ago by ryandesign@…

  • Cc ryandesign@… added

Replying to michaelld@…:

As I do not have a retina Mac, I really cannot test any change I make.

I can test Retina display patches if you need me to.

comment:8 in reply to: ↑ 6 Changed 17 months ago by nils.carlson@…

Replying to michaelld@…:

Thanks for the info. As I do not have a retina Mac, I really cannot test any change I make. And, reviewing that bug report it seems that they are not yet in agreement as to what change(s) to make, not exactly. So, I'm going to wait until they fix it and then I can pop in a temporary patch to qt4-mac using their changes. I try to track Qt fixes, but if i miss it please post here that the ticket was fixed.

Well, qt can fix the qt apps, but the python.app itself also needs the fix as this in turn can launch pyqt programs. I can see if I can try to create a patch, don't have much time though.

comment:9 Changed 16 months ago by eborisch@…

  • Cc eborisch@… added

Cc Me!

comment:13 Changed 14 months ago by michaelld@…

I was just forced to get a new Mac, and chose a retina one. Looking at the latest Qt4 install I see no issues with the .app's that Qt installs. Even without the <dict> their icons are very nice and smooth. Python's .app's are chunky in comparison; so, I think Qt4 is doing the right thing (even without me doing anything beyond updating it). I have not made it to installing any KDE apps to see how they look; I do not use KDE and no longer help maintain those ports. Can someone else verify all of this? Is this ticket still valid? I see that the Qt folks still haven't decided what to do.

comment:14 Changed 14 months ago by ryandesign@…

It seems to vary by application. Tiled, for example, is Retina-enabled, but QupZilla isn't.

comment:15 Changed 14 months ago by michaelld@…

Do you think this a qt4-mac specific issue then?

comment:16 Changed 14 months ago by ryandesign@…

Based on just those two ports, it looks like developers need to put NSHighResolutionCapable into their Info.plist, as discussed above. I don't know if we should try to fix this for all qt4-mac-using ports in the qt4 portgroup. For all we know there might be an app that doesn't work right in Retina mode. Perhaps we should leave it up to each individual app to add that key if appropriate.

comment:17 Changed 14 months ago by michaelld@…

Tiled's Info.plist contains the "NSHighResolutionCapable" key; this file is actually part of the source (not generated by QMake or elsewhere). I don't like its icon, but it is high-res and all glossy and such. I don't find this key in the standard Qt4 .apps, but they are clearly high-res too. Looking around qt4-mac's install, QtCore provides a template Info.plist; it does not contain this key. Maybe Qt4 is doing something internally now? Anyway, given the sampling of 2 ports handling things differently, I think that it really is up to each port itself to do this setting or handle it internally. I don't think me changing QtCore's Info.plist will help much, if at all.

Note: See TracTickets for help on using tickets.