Qt for Android 环境变量
启用或禁用变通方法
Qt for Android 使用一些环境变量来启用/禁用某些变通方法:
常用变量
| 变量 | 说明 |
|---|---|
| qt_android_noo_exit_call | 在某些情况下,Android 应用程序在调用exit() 时可能无法安全地清理所有线程,因而可能会崩溃。这是因为有 C++ 线程在运行,如果不加入这些线程而将其销毁,应用程序就会终止。这些线程无法加入,因为无法知道它们是否在运行。此标记可避免调用exit() ,让 Android 系统来处理,但代价是不尝试运行全局析构函数。 |
| qt_android_enable_workaround_to_disable_predictive_text | 允许隐藏预测文本建议,主要是密码字段。某些设备无法正确处理此功能。更多信息,请参阅 "预测文本"。 |
| qt_android_enable_right_mouse_from_long_press | 将长触按解释为鼠标右键单击事件。 |
| qt_android_disable_accessibility | 禁用辅助功能。这将阻止处理辅助功能事件。 |
不常用变量
| 变量 | 说明 |
|---|---|
| qt_android_font_location | 设置系统字体的自定义路径。 |
| qt_android_max_assets_cache_size | assets 文件夹下资产的缓存大小。 |
| qt_android_disable_glyph_cache_workaround | 请参阅文本字形缓存 |
| qt_android_raster_image_depth (光栅图像深度) | |
| qt_android_minimum_mouse_double_click_distance(最小鼠标双击距离 |
注意: 尽管相关,但这些与 Qt For Android 使用的 CMake 命令或变量不同,请参阅Qt for Android CMake 配置。
© 2025 The Qt Company Ltd. 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.