Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTextCursor position out of range..
-
i am using a plaintextedit to show files..unfortunately hen i try to add a new line, console says :
QTextCursor::setPosition: Position out of range
-
hi
how do you add the new line ?https://stackoverflow.com/questions/26578319/error-when-im-trying-to-set-text-in-qtextedit
-
@mrjj i already truied this stackoverflow solution, but didn't work
-
@mrjj i use insertPlainText() to append new text.. when i move the cursor to next line, this console warning appears
-
@abdullahzubair109
but is next line valid ?
you can trymoveCursor(QTextCursor::Start);
moveCursor(QTextCursor::End);
and see if its then in a valid posistion.
-
@mrjj warning is caused by this : https://code.woboq.org/qt5/qtbase/src/gui/text/qtextcursor.cpp.html#_ZN11QTextCursor11setPositionEiNS_8MoveModeE