Yes, you have done something wrong in the code AND you are misunderstanding the output of the pidin command:
The behavior of your code is unspecified because you are passing NULL (which gets converted to 0) as the thread-id. QNX numbers its threads from 1, therefore thread 0 is unspecified. Experimentation shows that passing 0 for the TID behaves identically to passing 1, for both pthread_setname_np and pthread_getname_np. Therefore, your code is setting and getting the ID of the main thread and not that of the thread you created via the pthread_create() call. You should pass threadhandle as the parameter of the set/get_name calls to actually refer to the newly created thread:
iReturn = pthread_setname_np(threadhandle, "HappyThread");
With no arguments pidin does not display the thread-name set via pthread_setname_np() at all. When called with no arguments pidin displays the process ID in the first column, the thread ID (numeric) in the second column and the name of the process in the third column (that's what you likely misunderstood for the thread-name).
you can call pidin with argument 'threads' as suggested by others above; this will display the thread-name in the third column if one has been set up or the numeric thread ID otherwise. Alternatively, you can call pidin similar to the following in order to get both the numeric and symbolic (if available) ID-s of each thread:
pidin -faNbh
For each thread in the system this will print the PID, process-name, TID and thread-name in that order. Refer to "use pidin" for how that works.