Developing a QML logging widget using TextArea - scrolling issues
-
My application connects to a remote device and downloads logs from it in C++ code.
I need to create a widget to display a log text.
I decided to use QML TextArea for that, I am basically callingQMetaObject::invokeMethod(loggingWidget, "append", Qt::QueuedConnection, Q_ARG(QVariant, msg));
when new message arrives andremove
when logs are too big.The only issue is that when
append
orremove
is called the scrolling jumps to end/beginning of the text area correspondingly.
Is there a way to disable this behavior? -
This may be old information but according to following SO question;
http://stackoverflow.com/questions/24395583/disable-auto-scrolling-in-a-textarea
Best you can do is alter text inside TextArea "manually" to prevent scroll bar from moving automatically .