Bug 392779

Summary: Cursor doesn't disappear after deselecting QLabel
Product: [I don't know] kde Reporter: Egor Vladimirovich <egor>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: bugseforuns, gerbilsoft, scott
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot of the bug, as it appears in Dolphin
List of Qt/KDE related package versions on my PC
List of Qt/KDE-related package versions on my laptop

Description Egor Vladimirovich 2018-04-05 21:53:31 UTC
Created attachment 111861 [details]
Screenshot of the bug, as it appears in Dolphin

When you change focus from a selectable QLabel (that is, a QLabel with TextSelectableByKeyboard and TextSelectableByMouse interaction flags set), the text cursor doesn't disappear. You can click back on the label, and it will change the position of cursor as intended, but clicking on anything else won't remove the cursor.

Steps to reproduce:
1) right click on any file in Dolphin
2) click Properties
3) on General tab, click anywhere inside Location field (make sure you don't select any characters)
4) click the edit control on the top (the one with file name)

Actual Results:
The text cursor in Location field didn't disappear

Expected Results:
The cursor should disappear

Versions:
KDE Plasma Version: 5.12.4
KDE Frameworks Version: 5.44.0
Qt Version: 5.10.1
Kernel Version: 4.15.14-1-ARCH
Dolphin Version: 17.12.3

Additional Information:
This bug only occurs if nothing is selected. If at least one character is selected, both the cursor and the highlight of the selected characters disappear as intended.

This doesn't seem like a Dolphin bug. I made a Qt form with multiple QLabels, and after clicking on each label, all of them had a text cursor.

This also doesn't look like a glitch, it's very consistent in how it works, and it doesn't disappear on its own.

I should also note that the cursors (both the "real" one as well as the "shadow" ones) don't blink. Not sure if they are supposed to blink or not, as I don't remember how it's supposed to be. The cursor in the line edit widget blinks correctly.

Things I tried:
- Changing window decorations and widget styles
- Disabling compositor (Shift+Alt+F12)
- Rebooting
Comment 1 Egor Vladimirovich 2018-04-05 22:02:31 UTC
Created attachment 111862 [details]
List of Qt/KDE related package versions on my PC

Output of the following command as run on my PC
pacman -Q $(pacman -Qgq plasma) $(pacman -Qgq kf5) $(pacman -Qgq qt5) dolphin
Comment 2 Egor Vladimirovich 2018-04-05 22:21:33 UTC
Created attachment 111865 [details]
List of Qt/KDE-related package versions on my laptop

Reproduced on my laptop. I haven't updated it for a few days, so it has older frameworks (5.43.0), same version of qt, but older arch package release, and older dolphin (17.12.2). I don't have plasma installed there.

Attached is the list of packaged on my laptop, made with the same command as before.
Comment 3 Scott Harvey 2018-04-06 11:00:34 UTC
I tested this in Dolphin, and it happens exactly as you described.

It appears to be an unresolved bug in Qt: https://bugreports.qt.io/browse/QTBUG-59514