C++ (Qt)class Form : public QWidget{ Q_OBJECT public: Form( QWidget *parent = 0 ); ~Form(); private: QLineEdit *line; QPushButton *button;};#endif
C++ (Qt)Form::Form( QWidget *parent ) :QWidget( parent ){ line = new QLineEdit( this ) button = new QPushButton; QPushButton *testButton = new QPushButton;}
C++ (Qt)int main(int argc, char *argv[]){ QApplication a(argc, argv); Form w; w.show(); return a.exec();}