From 4222d117d2f6e50fde8483bf81295d0244dfc269 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 30 Mar 2022 13:51:43 +0200 Subject: [PATCH] Baseline tests: slow down cursor blinking Override the default cursor blink time so that we don't get mismatches from line edits. We need to set the time to > 0 so that QStyleHints does not fall back to the platform integration. Pick-to: 6.3 Change-Id: Ib1d04f7450c01c352c13098886aee032dcb14c72 Reviewed-by: Axel Spoerl Reviewed-by: Eirik Aavitsland --- tests/baseline/shared/qwidgetbaselinetest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/baseline/shared/qwidgetbaselinetest.cpp b/tests/baseline/shared/qwidgetbaselinetest.cpp index b5db9a23f15..8852c611cbc 100644 --- a/tests/baseline/shared/qwidgetbaselinetest.cpp +++ b/tests/baseline/shared/qwidgetbaselinetest.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include QT_BEGIN_NAMESPACE @@ -53,7 +54,10 @@ QWidgetBaselineTest::QWidgetBaselineTest() #else QApplication::style()->name(); #endif + // turn off animations and make the cursor flash time really long to avoid blinking QApplication::style()->setProperty("_qt_animation_time", QTime()); + QGuiApplication::styleHints()->setCursorFlashTime(50000); + QByteArray appearanceBytes; { QDataStream appearanceStream(&appearanceBytes, QIODevice::WriteOnly);