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. Regarding CPU % shooting up ,while vertical scrollbar handle moving.(Platform : TI am335x Sitara Board)
Forum Updated to NodeBB v4.3 + New Features

Regarding CPU % shooting up ,while vertical scrollbar handle moving.(Platform : TI am335x Sitara Board)

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 821 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.
  • Sudo007S Offline
    Sudo007S Offline
    Sudo007
    wrote on last edited by Sudo007
    #1

    In my Qt 4.8 application for embedded board( TI am335x Sitara Board ,256 MB RAM ), there are 7 static QWidgtes(contains 4 children viz. 1 QPushButton and 3 QLable ) as follows in a vertical Layout along with a vertical scrollbar

    | QPushButton | QLabel | QLabel | QLabel | vertical
    | QPushButton | QLabel | QLabel | QLabel | scrollbar

    Case 1:
    on vertical scrollbar handle moving, i'm changing the text of the pushbutton and QLables of 7 rows. The CPU% shoots up to 97%.

    Case 2:
    If i keep moving vertical scrollbar handle and wil not setText of any of the Row , however the CPU% shoots up to 67%.

    What could be the reason behind it and how to control it.
    Your suggestion will be appreciated.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2
      • Are they in an scrollarea or do you handle the scrolling manually?
      • Are they pure QPushButton/QLabel or are they subclasses, if so, do you reimplement painting on any of them?
      • How do you connect the scroll bar movement to the text change?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      Sudo007S 1 Reply Last reply
      0
      • VRoninV VRonin
        • Are they in an scrollarea or do you handle the scrolling manually?
        • Are they pure QPushButton/QLabel or are they subclasses, if so, do you reimplement painting on any of them?
        • How do you connect the scroll bar movement to the text change?
        Sudo007S Offline
        Sudo007S Offline
        Sudo007
        wrote on last edited by
        #3

        @VRonin

        • They are not in the scroll area and i am doing it manually only.
        • They are pure QPushButton/QLabel
        • i'm catching scrollbar actionTrigerred signal and based on that i change the value of the QPushButton/QLabel
        VRoninV 1 Reply Last reply
        0
        • Sudo007S Sudo007

          @VRonin

          • They are not in the scroll area and i am doing it manually only.
          • They are pure QPushButton/QLabel
          • i'm catching scrollbar actionTrigerred signal and based on that i change the value of the QPushButton/QLabel
          VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          @Sudo007 said:

          am doing it manually only.

          My money is on this being the bottleneck. Could you try replacing your manual handling with a QScrollArea?

          basically create a QWidget with:
          | QPushButton | QLabel | QLabel | QLabel
          | QPushButton | QLabel | QLabel | QLabel

          then call QScrollArea::setwidget to put in the scroll area.
          you can then use QScrollArea::verticalScrollBar()::valueChanged() signal to handle the text change

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          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