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. QItemDelegate::paint() - paint row based on criteria from single cell
Forum Updated to NodeBB v4.3 + New Features

QItemDelegate::paint() - paint row based on criteria from single cell

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.7k 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
    gaijinpunch
    wrote on last edited by
    #1

    Hi

    I'm just about done migrating a project from QTableWidget to QTableView. The last bit has to do with painting each row. Generally I will look for several user-entered criteria. Out of 10 columns, perhaps the data in column 8 return true, and I need the background of the entire row painted red.

    I've reimplimented QItemDelegate::paint() successfully, but it is called for each cell, not for each row.

    If I understand the model/view concept correctly, in a case such as above, I'm going to have to keep track of what row should be what color, and then re-request an update for each cell in that row? I've got kind of a scrolling thing going. Imagine a bunch of ping messages from different nodes coming in, where each new one is placed on top.

    Still trying to wrap my head around this after working w/ QTableWidget for so long.

    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