Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QLineEdit CPU usage
Qt 6.11 is out! See what's new in the release blog

QLineEdit CPU usage

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.4k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi

    Any thoughts on QLineEdit causing higher CPU usage while user inputs?

    Also when it's read only, I am seeing paintEvent is getting called repeatedly..It should happen in case of NOT read only to show the cursor right? Any thoughts on optimizing QLineEdit for CPU would help...

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Without more information about how you are using your QLineEdit it will be difficult to tell. Are you using a mask ? a validator ? Got it connected to a slot that does some heavy processing etc. ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi,

        There's no input mask/ validator set.
        Use case is while dialing digits in dialer input to dial phone no/Extn .

        Yes,its connected to slots which updates UI elements like softkeys etc. but doesn't seem to be time taking at least from logs...

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          One more info..on Phone (Linux) I've tried with built in QLineEdit (we'are using custom derived one) on phone..
          Rapid input causes 40% CPU usage ensuring only QLineEdit Rect is getting painted.. I tested this with QT_ FLUSH_PAINT

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            is it justifiable? Question for earlier post

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I find it surprising but since you are on a phone, what Qt version are you using ? What's the phone distribution ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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