[Solved]Delegates and resizeColumnsToContents

  • Hi!
    I have a table with content like:

    @state | mode

    1 0
    2 1@

    And delegate which displays data in table view as:

    @state | mode

    Active Auto
    No response Manual@

    When i call resizeColumnsToContents TableView resize it to real data width which are 1, 0 ...
    how let know TableView about width of content from delegate

    and how post tables on this forum?

  • Moderators

    did you override sizeHint() of your delegate implementation?

  • No i didn't.
    I'l try it, thanks.

  • Yeah, that's it. Thank you raven-worx.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.