Thank you very much! The problem is solved. Indeed, it is a C/C++ scoping problem. I put the declaration of QTreeView into the header file, and it works!!!

Thank you very much.