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. QML TableView - format column based on the content
Forum Update on Monday, May 27th 2025

QML TableView - format column based on the content

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 502 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.
  • Q Offline
    Q Offline
    QtHelex
    wrote on 28 Apr 2017, 09:02 last edited by QtHelex
    #1

    Hello Forum!

    I have a QML TableView with 3 TableViewColumn elements and a model which contains together with some strings 2 boolean values.
    http://doc.qt.io/qt-5/qml-qtquick-controls-tableview.html

    I would like to change depending on the boolean values the text color, cell background or maybe the font.

    The TableViewColumn element doesn't deliver anything for formating.
    http://doc.qt.io/qt-5/qml-qtquick-controls-tableviewcolumn.html

    The rowDelegate or itemDelegate is made for this. But I seem to have there no access to the roles and hence not to the boolean values of the elements in the row.

    Is there even a solution for formating depending on the content?

    Target: Windows Desktop.

    Thanks for any kind of hints...
    QtHelex

    1 Reply Last reply
    0

    1/1

    28 Apr 2017, 09:02

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved