Hi,
I have a QTreeView that uses a subclassed QStandardItemModel model.
The treeview should keep an user list for a chat program.
What I want to do is to subclass QStandardItem in order to make user insertion/deletion/hiding easier but I'm not sure how should I reimplement the QStandardItem * QStandardItem::clone () const [virtual] method. I know that I need to do that in order to call void QStandardItemModel::setItemPrototype ( const QStandardItem * item ) in the model.
Here's what I was thinking the derived class should look like:
Qt Code:
private: bool online; /* some other flags */ public: /* default constructors and overloaded ones */ bool isOnline () const { return online; } /* other functions */ };To copy to clipboard, switch view to plain text mode
Considering I'm not using pointers as data members should I worry about clone () ?
I'm really confused on this one.
Thanks!
Bookmarks