Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.15, 6.6
-
None
-
Windows 10
-
-
1d953b2fb (dev), 1df12820f (6.7), 01546825a (6.6), 029a4c3ec (tqtc/lts-6.5)
Description
When executing QKeySequence::DeleteStartOfWord (Ctrl + Backspace) in a QLineEdit with text selected has unexpected behavior when compared to other inputs such as a QTextEdit (or browsers).
The following table shows the different behavior when pressing Ctrl + Backspace. ^ shows the selection and | shows the cursor position.
Input | QLineEdit | QTextEdit (and browsers) |
---|---|---|
Some Text| |
Some | |
Some | |
Some Text| ^^^^^^^^^ |
|Text |
|(empty) |
Some Text| ^^^^ |
Some |Text |
Some | |
Some Text| ^^^^^ |
|(empty) |
Some| |
Some Text| ^^^^^^ |
|(empty) |
Som| |
Some| ^^^^ |
|Some |
|(empty) |
In a screen recording (top is QTextEdit, bottom is QLineEdit).
I'm happy to contribute a fix for this issue.
Attachments
For Gerrit Dashboard: QTBUG-120006 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
524524,6 | QLineEdit: Use existing selection when deleting a word | dev | qt/qtbase | Status: MERGED | +2 | 0 |
525512,2 | QLineEdit: Use existing selection when deleting a word | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
525571,2 | QLineEdit: Use existing selection when deleting a word | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
525622,2 | QLineEdit: Use existing selection when deleting a word | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |