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 <axel.spoerl@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
dc96d812ec
commit
4222d117d2
@ -31,6 +31,7 @@
|
|||||||
#include <qbaselinetest.h>
|
#include <qbaselinetest.h>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
|
#include <QStyleHints>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
@ -53,7 +54,10 @@ QWidgetBaselineTest::QWidgetBaselineTest()
|
|||||||
#else
|
#else
|
||||||
QApplication::style()->name();
|
QApplication::style()->name();
|
||||||
#endif
|
#endif
|
||||||
|
// turn off animations and make the cursor flash time really long to avoid blinking
|
||||||
QApplication::style()->setProperty("_qt_animation_time", QTime());
|
QApplication::style()->setProperty("_qt_animation_time", QTime());
|
||||||
|
QGuiApplication::styleHints()->setCursorFlashTime(50000);
|
||||||
|
|
||||||
QByteArray appearanceBytes;
|
QByteArray appearanceBytes;
|
||||||
{
|
{
|
||||||
QDataStream appearanceStream(&appearanceBytes, QIODevice::WriteOnly);
|
QDataStream appearanceStream(&appearanceBytes, QIODevice::WriteOnly);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user