Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QLineEdit SetText() causes CPU and Memory Usage increase

QLineEdit SetText() causes CPU and Memory Usage increase

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 3.1k Views
  • 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.
  • N Offline
    N Offline
    naveeng
    wrote on last edited by
    #1

    We are running Qt 4.6.2 on a ARM board (Debian Linux 2.6.28) with 256MB RAM.

    We have a QLineEdit Control where the text is set using setText() every 1 second. Over a period (observed over 2 days) CPU usage and Memory usage reported by top command increases (it started with CPU usage of 4.5% and memory usage of 4.1% and
    ended up with around 50% CPU Usage and 10% memory usage after 2 days)

    If you do not call setText() or call it with empty string CPU and Memory usage remains constant over a long period.
    For testing we replaced the QLineEdit control with QLabel, and there is no CPU or memory usage increase.

    Searching over the net and Qt mailing lists, there were some related discussions. QLineEdit has undo/redo feature and buffer, as per the Qt manual undo/redo buffer gets cleared whenever we set the text using setText() method, so I understand this is not an issue.
    Not sure what is the issue with QLineEdit and setText(), Please let me know if anybody had similar experience, any solutions or inputs.

    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