Important: Please read the Qt Code of Conduct -

[SOLVED] How to show content of another cell in QTableView in italics on condition?

  • I have table(id, name_first, name_second) and ComboBox. On ComboBox currentIndexChanged(int) i hide or show specific column of QTableView.
    Like this:

    |1 | "first"
    |2 | "second"
    |3 | "third"

    Some of the name_second cells may be empty
    And when combobox is changed to other value i see:

    |1 | "one"
    |2 | ""
    |3 | "three"

    In 2nd row i want display content of name_first column in italics.
    I think i will need to derive from QTableView but what should I override?

  • Lifetime Qt Champion


    That would rather be something to do in the your model or using a QIdentityProxyModel

Log in to reply