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. adapting a TableViewColumn delegate slightly

adapting a TableViewColumn delegate slightly

Scheduled Pinned Locked Moved QML and Qt Quick
tableview table
3 Posts 2 Posters 991 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.
  • I Offline
    I Offline
    iridefix
    wrote on last edited by iridefix
    #1

    Hi,

    my goal is to round the numeric values of a TableView column. Therefore I created a delegate for the TableViewColumn. But now the formating of the text is different to the one of the ohter columns. How can I force the column to have the same properties (font.pixelSize, ...) like the other columns (which have default properties)?

    Component {
    id: columnDelegate
    Text {
    color: styleData.textColor
    elide: styleData.elideMode
    text: Math.round(styleData.value * 100) / 100
    }
    }

    best regards

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      AFAIK there's no way to do that. The only way to do that would be to use the same custom delegate for other columns too.

      157

      I 1 Reply Last reply
      0
      • p3c0P p3c0

        Hi,

        AFAIK there's no way to do that. The only way to do that would be to use the same custom delegate for other columns too.

        I Offline
        I Offline
        iridefix
        wrote on last edited by
        #3

        @p3c0

        Ok thanks. I was assuming this.

        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