Important: Please read the Qt Code of Conduct -

QTableView item size

  • Hi all,

    i try to add a row to QStandardItemModel. The Model has other rows with 5 columns. The new row only has 2 columns.

    Usually it looks like that:

    Header, Header, Header, Header, Header

    but now i want to insert a row like this:

    at the moment it is only like this:

    The problem is that the text in the second item is not completely shown.
    So how can i change the size of the second item, so that the row has the same width like the other rows?

    i hope you understand whats my problem!


  • Did you look at QTabelView::setSpan()?

  • Thanks, thats it!

Log in to reply