1

I just upgraded to a new laptop w/ a UHD 4K display. It looks beautiful, but my Chaco plot labels are now illegibly small. I could solve the problem for myself, by increasing the font size of these labels, but then they would appear too large to people running the same application on standard resolution displays.

How can I automatically detect and adapt to a particular display resolution in my Chaco plotting application?

As per @Alexandre\ Chabot, below, I do appear to be using Qt 5:

$ conda list qt
# packages in environment at C:\Users\capnf\AppData\Local\Continuum\anaconda3\envs\pybert-dev:
#
# Name                    Version                   Build  Channel
pyqt                      5.12.3           py38haa244fe_7    conda-forge
pyqt-impl                 5.12.3           py38h885f38d_7    conda-forge
pyqt5-sip                 4.19.18          py38h885f38d_7    conda-forge
pyqtchart                 5.12             py38h885f38d_7    conda-forge
pyqtwebengine             5.12.1           py38h885f38d_7    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge

So, how do I "tweak" Qt, to enlarge the font sizes of my Chaco plot index and value axes?

Or, better yet, how do I "coax" Qt5 into displaying things in a DPI-independent fashion?

dbanas
  • 1,707
  • 14
  • 24
  • Checkout this Enable demo to change the HiDPI support of a ComponendEditor: https://github.com/enthought/enable/blob/main/enable/examples/demo/enable/hidpi_component.py – Alexandre Chabot Sep 12 '21 at 21:12

1 Answers1

0

The screen resolution support is not part of Chaco but rather of the backend used to render the UI. I'm going to assume that you're using Qt, and not Wx. If it's possible for your project, I recommend upgrading to a Qt version that 5 or greater. Qt5 greatly improved the support for high-DPI screens.

  • Thanks @Alexandre\ Chabot! I appear to be using Qt-5. (See additions to original question.) So, how can I control the font sizes of my Chaco plot index and value axes? – dbanas Sep 06 '21 at 01:38