QML クイックフィックス

QML コードに以下のクイックフィックスを適用します:

  • ID 名の変更
  • 初期化子を分割する
  • QML タイプを別のファイルに移動し、他の.qml ファイルで再利用する。

以下の表は、QMLコードのクイックフィックスをまとめたものです。カーソルが「Activation」欄に記載されている位置にあるときに実行できます。

クイックフィックス説明アクティブ化
コンポーネントを別ファイルに移動QMLタイプを別のファイルに移動します。新しいコンポーネントに名前を付け、プロパティを新しいコンポーネントに設定するか、元のコンポーネントに設定するかを選択します。

コンポーネントを別のファイルに移動ダイアログ

QML タイプ名。
分割イニシャライザ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.