movePosition API does not work for large value of row (>17k)
-
QtextEditLocal QtextEditLocalObj;
QFile file(myLocalFile);MacroTextEdit *textEdit = new MacroTextEdit(&QtextEditLocalObj;);
textEdit->setPlainText(file.readAll());
QTextCursor tc = textCursor();
tc.movePosition(QTextCursor::Start);
tc.movePosition(QTextCursor::NextBlock,QTextCursor::MoveAnchor, iRow);
setTextCursor( tc );
ensureCursorVisible();Below Qt5.15.2 APIs are too slow that make my application hang.
1)-movePosition
2)-setTextCursorHow ever if I use previous version of Qt i.e Qt5.12.10.
Both API works fine and have much better performance and not hanging my application anymore.
Can anyone help me where i could be incorrect?
is i am not using some other Api which are introduced in Qt5.15.2?
The file on which i am working is 1 MB in size which contains 20k lines.Issue occure at tc.movePosition(QTextCursor::NextBlock,QTextCursor::MoveAnchor, iRow); when iRow is > 17k.
when trying to jump from line 100 to 17k above api does not work and get hang.
Thanks,
Rajesh -
Hi and welcome to devnet,
Did you already check the release notes to see if something changed with these classes ?
If you have a minimal example showing that, you may also have found a regression. So the next step would be to check the bug report system to see if there's something related.