August 4, 2011

zither zither
Lab Rat
87 posts

How to insert two List of QStandardItem into QStandardItemModel?


Dear all,

I try to insert two QStandardItem List.

  2. QStandardModel.insertColumn(items1);
  3. QStandardModel.insertColumn(items2);

What I want is
  1. items1
  2. items1
  3. items1
  4. items1
  5. items2
  6. items2
  7. items2
  8. items2

But what I got is

  1. items2 items1
  2. items2 items1
  3. items2 items1
  4. items2 items1

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

1 reply

August 4, 2011

peppe peppe
Ant Farmer
1005 posts

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


Software Engineer
KDAB (UK) Ltd., a KDAB Group company

  ‹‹ [SOLVED] QTreeView won’t display the model contents      QVTKWidget Error!! Please Help ››

You must log in to post a reply. Not a member yet? Register here!