C++ (Qt)class MyItem : public QTreeWidgetItem {public: MyItem( void ) : mObj(new QObject) {} ~MyItem( void ) { delete mObj; } QObject * GetObj( void ) const { return mObj; } private: MyItem( const MyItem & ) {} MyItem & operator = ( const MyItem & ) {} QObectt * mObj;};