设置高 DPI 缩放

Qt Creator 支持的操作系统实现高 DPI(每英寸点数)缩放的水平各不相同。因此,在不同的操作系统上,Qt Creator 处理高 DPI缩放的方式也不同:

  • 在 macOS 上,Qt Creator 强制进行高 DPI 缩放,这意味着它允许 Qt XML 使用系统缩放因子作为Qt Creator 的缩放因子。
  • 在 Linux 上,Qt Creator 由用户自行启用高 DPI 缩放,因为在不同的发行版和窗口系统上,这一过程差异很大,无法可靠地自动完成。

将缩放因子或 DPI 设置为精确的物理显示 DPI 可能不会带来良好的视觉效果,这是因为涉及到分数缩放。Rounding ,将缩放因子设置为 25% 的增量可以改善效果。

要设置 DPI 四舍五入策略,请

  1. 选择首选项>Environment >Interface

    环境偏好设置中的界面选项卡

  2. DPI rounding policy 中,选择 DPI 四舍五入选项。
  3. 重新启动Qt Creator ,使更改生效。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.