I use QString::fromWCharArray(wchar_t*) to assign a wchar_t array to QString but the QString always is empty.

Here is my code:
Qt Code:
  1. wchar_t * temp = new wchar_t[4];
  2. temp[0] = 'a'; temp[1] = 'b'; temp[3] = 'c'; temp[4] = 0;
  3. QString test;
  4. test.fromWCharArray(temp);
To copy to clipboard, switch view to plain text mode 
The result is test = "". My expectation is test = "abc".

I appreciate very much if anyone could tell me what's wrong.
Many thanks in advance.