hello,

i'm trying to repopulate a WStandardItemModel so the WCartesianChart
which holds the model redraws the data immediately:

<snip>

model->clear();
model->insertColumns(0,7);
model->setHeaderData(0, boost::any(WString("Header1", UTF8)));
...
model->setHeaderData(6, boost::any(WString("Header7", UTF8)));

for (size_t i = 0; i < result.num_rows(); i++){
  r = model->rowCount();
  model->insertRow(r);
  model->setData(r, 0, data[i][0]);
  ...
  model->setData(r, 0, data[i][6]);
}

<snip>

the first time i call this method everything works fine.
when i call this method and catch the data again from the database with
different rowsize a clean chart is shown with the right axis and grids
in the correct size but no data lines and no legend.

what went wrong?

isn't it enough to clear and refill the model? do i have to call another
method like 'refresh' or similar?


thanx,
johannes.


------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to