C++ (Qt)class CMyBase : public QObject{ Q_OBJECTpublic: CMyItem* MyItem; bool setMyItem(QVariant value);}bool CMyBase::setMyItem(QVariant value){ return MyItem->setValue(value); } class CMyItem : public QObject{ Q_OBJECTpublic: QList<CMySubItem>* list; bool setValue(QVariant value);}bool CMyItem:: setValue(QVariant value){ list->at(555)->setValue(value); return true;} class CMySubItem : public QObject{ Q_OBJECTpublic: QVariant myValue; bool setValue(QVariant value);}bool CMySubItem ::setValue(QVariant value){ myValue = value;}
C++ (Qt)while(!asleep()) sheep++;
list->at(555)->setValue(value);
C++ (Qt)#include <QtGUI> int main( void ) { for (int i = 0; i < 100; ++i) { QObject * test1 = new QObject; QObject * test2 = new QObject; printf("size = %ld (%p, %p)\n", (char *) test2 - (char *) test1, test1, test2); } return 0;}
C++ (Qt)...public: CMyItem* MyItem;...
C++ (Qt)...public: QList<CMySubItem>* list; ...
C++ (Qt) QList<CMySubItem>* list;
C++ (Qt) list->at(555)->setValue(value);