Search code examples
c++qtubuntu-18.04desktop-application

All of a sudden, my Qt application displays at 100% instead of the normal 200%, what did I changed that made it lose that feature?


In my settings, I clearly have my screen setup to 200% like so:

enter image description here

When I worked on my Qt application earlier, it would properly follow that setup.

Somehow, I changed a something and now it always appears at 100%. That makes it difficult to read the text.

What option(s) would Qt have that would turn that feature off?

I have other Qt applications that still work as expected, so I'm really thinking that's something I did. Maybe a widget I added? Or a call I make? I just have no idea what it could be so looking at my changes doesn't help at the moment.

One thing I added recently is a QSvgWidget, but even if I remove it, it still doesn't work. Another thing I've notice is that the OS (Ubuntu 18.04) updated the desktop themes. But I don't think that happened at that time.


UPDATE:

This seems to be generalized. I just upgraded my OS. The VirtualBox snap was updated and now the window also appears small (i.e. ignores the High DPI setup). So it must be an OS thing (i.e. a library that was updated and it breaks the Qt High DPI feature).


Solution

  • Okay! I got the answer to that one in my situation.

    Whenever nvidia sends a new version of their driver, my X11 session continues to work, but OpenGL is not accessible anymore. There must be something in Qt that decides to use OpenGL and since it (silently) fails opening a connection, it falls back to "no DPI scaling capability".

    After a reboot, everything is back to normal and zooms in and out as expected in my app and also the VirtualBox window.