Does the insertion operator make a copy of the value it is inserting?

For example... Lets say I have the following code...

Qt Code:
  1. struct someStruct {
  2. int x;
  3. double y;
  4. };
  5.  
  6. QList<someStruct> testList;
  7.  
  8. void className::methodName()
  9. {
  10. someStruct tempStruct;
  11. for (int x = 0; x < 10; x++) {
  12. tempStruct.x = x;
  13. tempStruct.y = 0;
  14. testList <<tempStruct;
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

tempStruct is local to the "methodName" method.
After this function returns, is testList valid?
In my test code it is. All works ok. But I'm trying to track down a particularly elusive bug and this is one of my concerns.

Here's a snippet of my actual code. I'll try to explain the error.

Qt Code:
  1. LayerDef layer; // LayerDef is the struct definition
  2. if (line.startsWith("Original")) {
  3. while (!line.startsWith(',')) {
  4. line = stream.readLine();
  5. if (line.startsWith(',')){
  6. continue;
  7. }
  8. tokens = line.split(',');
  9. layer.t = tokens[1].toDouble(); // layer is a struct.
  10. layer.dc = tokens[2].toDouble();
  11. layer.dlt = tokens[3].toDouble();
  12. layer.mlt = tokens[5].toDouble();
  13. layer.dcc = tokens[6].toDouble();
  14. layer.rp = tokens[7].toDouble();
  15. layer.name = tokens[8];
  16. layersOriginal <<layer; // layersOriginal is a QList (QList<LayerDef> layersOriginal;)
  17. if (firstPass) {
  18. firstPass = false;
  19. // Update slider values on first pass only.
  20. ui->sldT->setValue(layer.t); // Note this line.
  21. ui->sldDC->setValue(layer.dc);
  22. ui->sldDLT->setValue(layer.dlt);
  23. ui->sldMLT->setValue(layer.mlt);
  24. ui->sldDCC->setValue(layer.dcc);
  25. ui->sldRP->setValue(layer.rp);
  26. }
  27. ui->lstLayers->addItem(layer.name);
  28. }
To copy to clipboard, switch view to plain text mode 

This code runs ok. However, after it runs, any attempt to access sldT (a QSlider) causes an assertion failure.
The failure is "ASSERT failure in QVector<T>:perator[]: "index out of range", file ..\..\Qt\Qt5.3.2\5.3\mingw482_32\include/QtCore/qvector.h, line 385".
I've went through the code for QSlider and QAbstractSlider. I can't find any reference to a QVector in either of them.

This is my final step before I start banging my head on my desk.