Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.15.11, 6.4.2
-
None
Description
I am noticing a strange issue with QPlainTextEdit whereby it seems, in some circumstances, I have text selected but checking the object's textCursor() lies to me by telling me I have no text selected, and if I ignore that and check the start and end position, claims they are both the same when actually they are not.
The easiest way to demonstrate this is with this application: https://github.com/thedjnK/AuTerm
Reproduction steps:
- Build and run
- Once opened, click the terminal tab
- Type "22"
- Select those 2 characters and right click then click the second menu option
- The output shows "Error code 0x0" which is wrong because the selected text is 22
- If you have a serial device, you can open the port, press enter to send, then select the "22" that was sent in the terminal and right click the select the second menu option, upon doing this, it magically can detect you have selected some text
In this application, I have a custom event filter for dealing with keypresses - is this perhaps a cause for it, if something is not being updated or an event is not being triggered?