yes, you are right, my problem is :running my app is good on win7,getHashCode()is ok, but when I run the same app on ubuntu, getHashCode() generate a wrong value.I suspect that the error is from the integal type. the following is the relating code

yes, We develop our app on Win7, and now we wanna run it on ubuntu. buinding the app is ok and when I run app, tell me a pointer = 0. and then I trace app and suspect some type cause the problem . generally, app is ok on win7

The width of wchar_t is compiler-specific and can be as small as 8 bits. Consequently, programs that need to be portable across any C or C++ compiler should not use wchar_t for storing Unicode text. The wchar_t type is intended for storing compiler-defined wide characters, which may be Unicode characters in some compilers.

If you use Qt, why not go with QString all the way and avoid portability issues?