Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TextArea freezing
Forum Updated to NodeBB v4.3 + New Features

TextArea freezing

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gordy
    wrote on last edited by
    #1

    Hi, i need some help.
    I`m using TextArea component to collect results of threads in real time (kinda different to explain) so every thread calls "append" method and if there to many calls to TextArea freezes.
    So is there any other ways to make textual output without freezing?

    jeremy_kJ 1 Reply Last reply
    0
    • G Gordy

      Hi, i need some help.
      I`m using TextArea component to collect results of threads in real time (kinda different to explain) so every thread calls "append" method and if there to many calls to TextArea freezes.
      So is there any other ways to make textual output without freezing?

      jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by jeremy_k
      #2

      Is this in C++ or QML/javascript?

      Either way, using TextArea.append() as a slot via a queued connection rather than a direct function call should work.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      G 1 Reply Last reply
      0
      • G Offline
        G Offline
        Gordy
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • jeremy_kJ jeremy_k

          Is this in C++ or QML/javascript?

          Either way, using TextArea.append() as a slot via a queued connection rather than a direct function call should work.

          G Offline
          G Offline
          Gordy
          wrote on last edited by Gordy
          #4

          @jeremy_k, TextArea is in QML and append is called from c++ (Maybe i shouldn`t make it this way but don't know how to do this better) via QMetaObject::invoke. I used QueuedConnection but it doesn't helped. Must add that append called very frequently (almost every millisecond)

          1 Reply Last reply
          0
          • jeremy_kJ Offline
            jeremy_kJ Offline
            jeremy_k
            wrote on last edited by
            #5

            I put together a test, and see what sounds like the same thing. The UI stops responding. The text cursor doesn't move to the location of a mouse click. Blinking boxes stop blinking.

            The UI thread remains active based on console.info() ouput, and responsiveness is restored when the append operations end. During the freeze, the count of events to be delivered (qGlobalPostedEventsCount() from QtCore/private/qabstracteventdispatcher_p.h) goes through the roof.

            It looks like the UI thread has too much to do to maintain a reasonable frame rate. Some sort of data aggregation needs to occur prior to handing it to the UI thread for processing by TextArea.append().

            Asking a question about code? http://eel.is/iso-c++/testcase/

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved