After clicking on QLabel
with selectable text the cursor remains forever:
This PR fixes this visual bug.
Earlier attempts to fix this issue:
Concept ACK, multiple cursors visible is wtf-level confusing.
Should this be reported as an upstream issue too?
458+bool LabelOutOfFocusEventFilter::eventFilter(QObject* watched, QEvent* event)
459+{
460+ if (event->type() == QEvent::FocusOut) {
461+ QLabel* label = qobject_cast<QLabel*>(watched);
462+ if (label) {
463+ const QString content = label->text();
This also works
0 auto flags = label->textInteractionFlags();
1 label->setTextInteractionFlags(Qt::NoTextInteraction);
2 label->setTextInteractionFlags(flags);
Should this be reported as an upstream issue too?
Updated 4b7c95324f40738185f52da161d144f6e9f0c484 -> 5dbe2d60a83c06d550f104d79e1b9c82e49c7008 (pr19210.01 -> pr19210.02, diff):
This also works
555@@ -556,6 +556,9 @@ int GuiMain(int argc, char* argv[])
556 /// 9. Main GUI initialization
557 // Install global event filter that makes sure that long tooltips can be word-wrapped
558 app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
559+ // Install global event filter that makes sure that out-of-focus labels do not contain text cursor.
560+ // This is a temporary fix of QTBUG-59514.
This change is a temporary fix of QTBUG-59514.
Updated 5dbe2d60a83c06d550f104d79e1b9c82e49c7008 -> bd315eb5e27d49d47759ae9417328427426cb269 (pr19210.02 -> pr19210.03, diff):
nit, move/copy this comment to class doc