Quote Originally Posted by calmspeaker View Post
I think you should try one of the two!
You could use model/view programming or directly use QTreeWidget.
That's not really an answer to OP's question, is it? Or did OP edit the contents of the post?

Quote Originally Posted by yangyunzhao View Post
I want to my programme works as:
[IMG]I inherit my TreeItem form QStandardItem and inherit my TreeModel from QStandardItemModel. Is it suitable?
Yeah it is.

Quote Originally Posted by yangyunzhao View Post
I cannot completely understand QStandardItem.Could you give me more helps?
We can give more help, yes. However, it would be useful for all of us if you could specify what exactly you don't understand.

In general: QStandardItem helps you represent your tree structure in your code and knows how to access one specific piece of data. It will help you keep your actual model implementation simple, because you leave most of the work to the QStandardItem. It has a somewhat similar interface to models.