From 2a740b9cf59b2a343d19b2a45614ee2827c98da2 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 19 Apr 2016 13:01:12 +0200 Subject: Darwin: set SH_BlinkCursorWhenTextSelected to false on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When text is selected on e.g iOS or OS X, the cursor should not blink (or be visible), regardless of style. Note that SH_BlinkCursorWhenTextSelected is actually implemented to mean "hide cursor when text selected" in e.g QWidgetTextControl. If this is a bug or not is hard to say, but it is anyway the desired behavior on Apple platforms. Change-Id: I541dabbe1945c266107ba39e3adb006bec0258bf Reviewed-by: Jan Arve Sæther --- src/widgets/styles/qcommonstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 437becbf70..e8062e9f9e 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -4974,7 +4974,11 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget break; case SH_BlinkCursorWhenTextSelected: +#if defined(Q_OS_DARWIN) + ret = 0; +#else ret = 1; +#endif break; case SH_Table_GridLineColor: -- cgit v1.2.3