qt: Get rid of cursor in out-of-focus labels

This change is a temporary fix of QTBUG-59514.
This commit is contained in:
Hennadii Stepanov
2020-06-08 16:48:45 +03:00
parent 374fd6fc8b
commit bd315eb5e2
3 changed files with 39 additions and 0 deletions

View File

@@ -556,6 +556,8 @@ int GuiMain(int argc, char* argv[])
/// 9. Main GUI initialization
// Install global event filter that makes sure that long tooltips can be word-wrapped
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
// Install global event filter that makes sure that out-of-focus labels do not contain text cursor.
app.installEventFilter(new GUIUtil::LabelOutOfFocusEventFilter(&app));
#if defined(Q_OS_WIN)
// Install global event filter for processing Windows session related Windows messages (WM_QUERYENDSESSION and WM_ENDSESSION)
qApp->installNativeEventFilter(new WinShutdownMonitor());