Hi,

In Qt3 I used QArray like this:

Qt Code:
  1. QArray<float> *t;
  2. ...
  3. t = new QArray<float>(day_no+1);
  4. ...
  5. t->at(j) = j+1;
To copy to clipboard, switch view to plain text mode 

and that worked. But in Qt4 you cannot do that. So I changed it:

Qt Code:
  1. QVector<float> t;
  2. ...
  3. t[j] = j+1;
To copy to clipboard, switch view to plain text mode 

and that compiles OK but I want to do it like I did in Qt3 and allocate t as new:

Qt Code:
  1. t = new QVector<float>(day_no+1);
To copy to clipboard, switch view to plain text mode 

But how do I do the assignment then like line 3 in the middle chunk of the above?
Thanks!