使用例 - スタイルとテーマのサポート

QMLでスタイルを設定するには、ビジュアルタイプを作成し、それをプロパティにバインドするか、プロパティに直接値を代入します。Qt Quickデリゲートを組み込んだ型の場合、ビジュアル型はデリゲートプロパティにアタッチされます。

システム・パレットへのアクセス

SystemPalette 型はシステムのパレット情報を提供します。QMLアプリケーションはこの情報を使って、ビジュアルタイプの外観をネイティブのルック&フィールに合わせることができます。さらに、デスクトッププラットフォームでは、アプリケーションがキーボードフォーカスを失ったときなど、状態を変更するときに異なるカラーパレットが採用されます。

コントロールの使用時には、すでにシステム・カラーが使用されています。

© 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.