Implementation: ui-scale template and measure_scale, scale_font, inherit_fonts in
qt-compat.
3ds Max starts Qt with QT_ENABLE_HIGHDPI_SCALING=0 and QT_SCALE_FACTOR=1: the device pixel ratio is 1 on every
screen. Every size written in pixels (style sheet, setFixedSize, margins, icon sizes, the window size) stays
physical, so a tool designed on Full HD is small on a 2K screen and tiny on 4K. Only point-size fonts follow Windows
scaling (logical DPI). Qt will not fix this; the tool must.
One target scale, measured once at start-up before any window exists:
widget.screen()): the smaller of
width / 1920 and height / 1080 against steps: below 1.15 -> 100 % (Full HD), below 1.6 -> 125 % (2K, 2560 x 1440),
below 2.4 -> 150 % (4K, 3840 x 2160), above -> 200 % (5K and more).rt.GetUIScaleFactor()).target / qt_ratio (px()), points x target / windows_scale (pt()), so nothing is scaled twice.The interface size applies while windows are built. A changed choice shows “Applies when Name opens again.” and a “Reopen Now” button (inside Max: run the launcher again after the click returns; it restarts the session).
px(): margins, spacings, fixed sizes, icon sizes, minimum sizes, offsets
of popups. Class constants stay logical (EDGE = 4) because they are evaluated at import, before the scale is
known; multiply them where they are used (px(self.EDGE)).pt() (font.setPointSizeF(pt(20))).Npx (1 px borders stay at least 1 px) and
every Npt when it builds the sheet. Ratios that must hold (a scroll thumb radius = half its width) must still hold
after each number is rounded on its own: pick numbers that scale cleanly or check 125 % and 150 %.px() for padding and radii and the widget’s font metrics for text.px(size) times the device pixel ratio so they stay sharp.scale_font(window) once at the very start of each top-level window’s constructor (top-level windows do not inherit
fonts from a parent window). Popups (balloons, completer lists) take the font of the window that opens them.inherit_fonts(root) after polish: in the main window’s showEvent, in each dialog’s showEvent, and after building
rows later (lists refilled, groups rebuilt). It compares every widget with its class default and gives it its
parent’s size when it was not set on purpose.repolish(widget) gives the widget its parent’s size again right after polishing it; never re-polish by hand.showEvent: ComboBox.showPopup polishes its
view and runs inherit_fonts on the popup before Qt measures the rows.inherit_fonts on each
window right after its setStyleSheet (ThemeManager._apply), or fields drop to 9 pt after the first theme change.Menu.fit_fonts).font (self.font = monospace(...)): it hides QWidget.font(), and the font
helpers fail with “‘QFont’ object is not callable” at any interface size other than 100 %.The interface size is the same for the whole session and follows the screen; it is part of DPI correctness and is on by default. Breakpoint adaptation (smaller text and icon-only buttons in narrow windows, larger in wide ones) remains an opt-in the user must choose, as SKILL.md says.