Just as a side node: With toVector() you won't save so much, because it also expands to a loop. It's only a little bit more sophisticated:
Qt Code:
  1. Q_OUTOFLINE_TEMPLATE QVector<T> QList<T>::toVector() const
  2. {
  3. QVector<T> result(size());
  4. for (int i = 0; i < size(); ++i)
  5. result[i] = at(i);
  6. return result;
  7. }
To copy to clipboard, switch view to plain text mode