How to insert two List of QStandardItem into QStandardItemModel?



  • Dear all,

    I try to insert two QStandardItem List.
    @QList<QStandardItem*>items1;
    QList<QStandardItem*>items2;

    QStandardModel.insertColumn(items1);
    QStandardModel.insertColumn(items2);@
    What I want is
    @items1
    items1
    items1
    items1
    items2
    items2
    items2
    items2@

    But what I got is
    @items2 items1
    items2 items1
    items2 items1
    items2 items1@

    How can I fix that. items1 & items2 can't combine because they are generated with different time & places..
    Thanks



  • Of course two calls to insertColumn will insert two different columns; use a foreach + appendRow.


Log in to reply
 

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