Obsolete Members for TestCase

QMLのTestCase型における以下のメンバーは非推奨となっています。これらは、古いソースコードが引き続き動作するように提供されているものです。新しいコードでの使用は強くお勧めしません。

プロパティ

方法

物件に関する資料

optional : bool [deprecated in 6.12]

このプロパティは、QtTest 6.12 以降で非推奨となっています。新しいコードでの使用は強く推奨しません。

代わりに `skip()` を使用してください。

1つのテストアプリケーション内で、複数のTestCase 型を指定することができます。これらがすべて完了すると、アプリケーションは終了します。テストケースを実行する必要がない場合(前提条件が満たされていないためなど)、このプロパティをtrueに設定できます。デフォルト値はfalseです。

TestCase {
    when: false
    optional: true
    function test_not_run() {
        verify(false)
    }
}

when およびcompletedも参照してください 。


メソッドのドキュメント

[deprecated in 6.5] bool waitForItemPolished(object item, int timeout = 5000)

このメソッドは QtTest 6.5 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。

代わりに `waitForPolish()` を使用してください。

timeout ミリ秒間待機するか、item に対してupdatePolish()が呼び出されるまで待機します。

timeout ミリ秒以内にitem に対してupdatePolish() が呼び出された場合はtrue を返し、それ以外の場合はfalse を返します。

isPolishScheduled()、QQuickItem::polish()、およびQQuickItem::updatePolish()も参照してください 。


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