how to use ui file for making a simple widget?
问题 i have a simple window with a quit button in qt.The working code is shown below #include <QApplication> #include <QDialog> #include <QPushButton> class MyWidget : public QWidget { public: MyWidget(QWidget *parent = 0); }; MyWidget::MyWidget(QWidget *parent) : QWidget(parent) { setFixedSize(200, 120); QPushButton *btquit = new QPushButton(tr("Quit"), this); btquit->setGeometry(62, 40, 75, 30); btquit->setFont(QFont("Times", 18, QFont::Bold)); connect(btquit, SIGNAL(clicked()), qApp, SLOT(quit(