[Qt-interest] Unexpected behaviour with QPlainTextEdit emitting selectionChanged() signal when selecting with left mouse button held
mk2k at mk2k.net
mk2k at mk2k.net
Sat Feb 7 05:56:00 CET 2009
Hello,
when selecting text in a QPlainTextEdit with left mouse button held at least I would expect the
selectionChanged() signal being emitted on any change of the
selection. Actually that signal only gets emitted if the current
selection changes from 0 to 1 character or vice versa, but not when
the selection changes from 1 to 2 characters etc. so we stay at 1
selected character for example when calling
QPlainTextEdit::textCursor().selectedText().length() to measure the
currently selected number of characters.
This applies only to the left mouse button held selection, not to
Shift + Qt::Key_Up etc.
This also doesn't apply to the left mouse button being double clicked
and the whole text being selected.
Tested on Windows XP, Qt 4.4.3 static build
best regards
-- MK2k
More information about the Qt-interest-old
mailing list