Qt for Android の環境変数
回避策の有効化・無効化
Qt for Android では、いくつかの環境変数を使用して、特定の回避策を有効/無効にします:
よく使われる変数
| 変数 | 説明 |
|---|---|
| qt_android_no_exit_call | 場合によっては、Android アプリがexit() を呼び出している間にすべてのスレッドを安全にクリーンアップできず、クラッシュすることがあります。これは、実行中のC++スレッドがあり、それらを結合せずに破棄するとアプリケーションが終了するためです。これらのスレッドは、実行中かどうかを知ることができないため、参加させることができない。このフラグを使うと、exit() を呼び出さずに済みます。グローバル・デストラクタを実行しない代わりに、Androidシステムにこの処理を任せることができます。 |
| qt_android_enable_workaround_to_disable_predictive_text | 主にパスワードフィールドの予測入力候補を非表示にできるようにします。一部のデバイスでは、この機能が正しく処理されません。詳しくは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 |
注意: これらは関連しますが、QtFor Android で使用される CMake コマンドや変数とは異なります。
© 2026 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.