diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt index 61dca7c74d3..2e299c2174a 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt @@ -8,4 +8,6 @@ qt_internal_add_test(tst_qsequentialanimationgroup SOURCES tst_qsequentialanimationgroup.cpp + LIBRARIES + Qt::TestPrivate ) diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index e6e87313788..63b95f3dcbe 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -2,6 +2,8 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include +#include + #include #include #include @@ -1685,6 +1687,15 @@ void tst_QSequentialAnimationGroup::bindings() group.bindableCurrentAnimation().setBinding([&]() { return leader.value(); }); QCOMPARE(group.currentAnimation(), anim3.get()); + + QTestPrivate::testReadOnlyPropertyBasics(group, anim3.get(), anim2.get(), "currentAnimation", + [&group, totalDuration]() { + group.setCurrentTime(int(totalDuration * 1.5 / 3)); + }); + if (QTest::currentTestFailed()) { + qDebug("Failed property test for QSequentialAnimationGroup::currentAnimation"); + return; + } } QTEST_MAIN(tst_QSequentialAnimationGroup)