Obsolete Members for TestCase

Los siguientes miembros del tipo TestCase de QML están obsoletos. Se mantienen para que el código fuente antiguo siga funcionando. Recomendamos encarecidamente no utilizarlos en código nuevo.

Propiedades

Métodos

Documentación inmobiliaria

optional : bool [deprecated in 6.12]

Esta propiedad está en desuso desde QtTest 6.12. Recomendamos encarecidamente no utilizarla en código nuevo.

Utiliza en su lugar ` skip()`.

Se pueden especificar varios tipos de « TestCase » en una aplicación de pruebas. La aplicación se cerrará una vez que todos se hayan completado. Si no es necesario ejecutar un caso de prueba (porque ha fallado una precondición), esta propiedad se puede establecer en «true». El valor por defecto es «false».

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

Véase también « when » y « completed ».


Documentación del método

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

Este método está obsoleto desde QtTest 6.5. Recomendamos encarecidamente no utilizarlo en código nuevo.

Utiliza en su lugar ` waitForPolish()`.

Espera timeout milisegundos o hasta que se haya llamado a updatePolish() en item.

Devuelve ` true ` si se ha llamado a ` updatePolish() ` en ` item ` en un plazo de ` timeout ` milisegundos; en caso contrario, devuelve ` false`.

Véase también isPolishScheduled(), QQuickItem::polish() y 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.