Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.7.4, 4.8.6, 5.2.1
-
None
Description
Quotation from help:
cursorPosition : int
This property holds the current cursor position for this line edit.
...
By default, this property contains a value of 0.
Actually cursorPosition value contains a length of text. That causes QLineEdit showing end of text which is not expected behaviour.
setText always passes -1 for cursorPosition
void setText(const QString &txt) { internalSetText(txt, -1, false); }
internalSetText, pos is -1:
m_cursor = (pos < 0 || pos > m_text.length()) ? m_text.length() : pos;
Attachments
Issue Links
- relates to
-
QTBUG-97169 Docs: Improve cursorPosition description in TextInput and TextEdit docs
-
- Closed
-