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. Changing Rectangle border color decline performance
Forum Updated to NodeBB v4.3 + New Features

Changing Rectangle border color decline performance

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.2k 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.
  • J Offline
    J Offline
    jackyang
    wrote on last edited by
    #1

    I use GridView to build 3x3 rectangle block, and change the each border color when mouse hover entered, change back in exited.

    I notice the CPU utilization will increase when surfing on the Grid.

    If I simulate the border bar by 4 rectangle, and go to the same effect by change their color, then the CPU will go down apparently.

    Does someone have the same issue ?

    My environment is in Embedded Linux System, and use the frame buffer to display.

    Thanks : )

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      Are you on a very resource constrained system? Without having looked much at the code, I would guess that it spends the extra CPU simply because the entire rectangle is filled even if you only modify the border color. When borders are translucent, rounded or antialiased it often requires repainting the whole thing, so it generally just calls update() on the whole Item rect. It might be possible to special case this, but for now I think your fix sounds reasonable as it sounds like your bottle neck is simply the amount of pixels you can push and it might require managing each rect at a lower level.

      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