QML クイックフィックス
QML コードに以下のクイックフィックスを適用します:
- ID 名の変更
- 初期化子の分割
- QML の型を別のファイルに移し、他の
.qmlファイルで再利用する。
以下の表は、QMLコードのクイックフィックスをまとめたものです。カーソルが「Activation」欄に記載されている位置にあるときに実行できます。
| クイックフィックス | 説明 | アクティブ化 |
|---|---|---|
| コンポーネントを別ファイルに移動 | QMLタイプを別のファイルに移動します。新しいコンポーネントに名前を付け、プロパティを新しいコンポーネントに設定するか、元のコンポーネントに設定するかを選択します。
| QMLタイプ名。このアクションは2D ビューでも利用できます。 |
| 分割イニシャライザー | 1行の型を複数行の型に書き換えます。例えばItem { x: 10; y: 20; width: 10 }を Item {
x: 10;
y: 20;
width: 10
} | QML型プロパティ |
| コンポーネントをローダーにラップする | Component型で型をラップし、Loader型で動的にロードします。これは通常、起動時間を改善するために行われます。 | QML 型名 |
| メッセージ抑制コメントの追加 | メッセージの生成を抑制する注釈コメントを行の先頭に追加します。 | 静的解析によるエラー、警告、ヒント |
クイックフィックスの適用」、「ToDo リストからファイルを除外」、「シンボルの検索」、「シンボルの名前の変更」、「クイックフィックスの設定の指定」、「クイックフィックス」、「C++ クイックフィックス」も参照してください 。
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.
