class FormBlock: public QDialog, public Ui::ProcessForm {Q_OBJECTpublic: FormBlock(QWidget *parent = 0, const char *name = 0);public slots: virtual void buttonCancel_clicked(); virtual void buttonOk_clicked(); };extern FormBlock *blockForm;
int main(int argc, char *argv[]){ QApplication a( argc, argv ); blockForm = new FormBlock();!!!!!!!!!код программы...!!!!!!!! delete blockForm;return EXIT_SUCCESS;
FormBlock *blockForm;FormBlock::FormBlock(QWidget *parent, const char *name) :QDialog(parent){ setupUi(this); }void FormBlock::buttonOk_clicked(){ accept();}void FormBlock::buttonCancel_clicked(){ reject();}
C++ (Qt)int main(int argc, char *argv[]){ QApplication a(argc, argv); QTranslator Trans; Trans.load (a.applicationDirPath() + "/ling_ru.qm"); a.installTranslator (&Trans); ling w; w.show(); return a.exec();}
FormBlock::FormBlock(QWidget *parent, const char *name) :QDialog(parent){ QTranslator blockTrans; blockTrans.load("block_ru"); qApp->installTranslator (&blockTrans); blockForm->retranslateUi (this); setupUi(this); }
void retranslateUi(QDialog *ProcessForm) { ProcessForm->setWindowTitle(QApplication::translate("ProcessForm", "Process", 0, QApplication::UnicodeUTF8)); groupBox2->setTitle(QString()); textLabel1_2_2_2->setText(QApplication::translate("ProcessForm", "flights", 0, QApplication::UnicodeUTF8)); textLabel1_2_2_2_2->setText(QApplication::translate("ProcessForm", "reversals", 0, QApplication::UnicodeUTF8)); textLabel1_2_2_2_3->setText(QApplication::translate("ProcessForm", "flights", 0, QApplication::UnicodeUTF8)); }