-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.1.1
-
None
-
Windows 10
-
-
Other module responsible for the behavior
I will describe hard to reproduce bug. Hard to say what could be the cause - bad initialization or cache maybe. I do not know how to reproduce it - only happened on one GUI app session - but it happened a few times during that session and heavily undermined my trust in using QT.
I am using setText() over QLineEdit with no validator or mask. It's basic and easy, used it many times.
The string I was setting was randomly generated azAz09 plus few puntuations "!#$*+-.<=>@_". NO WHITE SPACES - I know first thing you will assume I badly generated string, but there are 2 symptoms and 1 of them is unrelated to the string generation itself.
I got the glitch in one session I was not able to reproduce it in the next sessions, trying to setText random string by clicking button about 100 times.
The bug
In one session when setting QLineEdit value I got a string with strange empty char in the middle. My generator was not supposed to return empty char so I double checked it and set some debug info for next sessions. Nevertheless I didn't break the session yet and tried few more times on that bad session and I got the white spaces a few times.
Still on that session I decided to copy-paste the string to notepad to verify what kind of empty char I got. And here is the 2nd part of the glitch - I was not able to copy the full string from QLineEdit to clipboard/notepad. I selected the whole input string using touchpad and used ctrl+c and ctrl+v on notepad++. The result was only the part before white char was copied. That's why I believe it's QLineEdit issue.
Later sessions could not reproduce it.
Also I tested what happens if I purposefully incorporate empty char (space) into the rand string - I was able to copy the full selected string even after space. So the empty char was surely not space.
To sum up - it looks like for some reason setText modified the string I was setting, incorporating strange white char that was working as an escape char for ctrl+c on Win10.