QTabWidget *qtw = new QTabWidget;QTextEdit *qte = new QTextEdit;QTextEdit *qte2 = new QTextEdit;qtw->addTab(qte,"TEST");qtw->addTab(qte2,"TEST2");QString str=QString("TEST");connect(qb, SIGNAL(clicked()),qte,SLOT(append("TEST")));
C++ (Qt)class A : public QWidget{ Q_OBJECT A(); private slots: void slot(int);... private: QTextEdit *qte;} ... A:A() : QWidget(){ qte = new QTextEdit(this); ...} void A::slot(int p){ qte->blabla();}