QList [] operator problem in multi-threaded mode

100 Views Asked by At

I have a problem with two following expressions:

QList myList;

Imagine we added some values to myList.

  1. QString temp1 = myList.at(0);
  2. QString temp2 = myList[0];

When using these two expressions in multi-threaded mode, the second expression causes an error and the code will crash but the first one is working. Could you please tell me the reason?

0

There are 0 best solutions below