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 calling QMetaObject::invokeMethod(loggingWidget, "append", Qt::QueuedConnection, Q_ARG(QVariant, msg)); when new message arrives and remove when logs are too big.

    The only issue is that when append or remove 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 .


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.