qt4
priklad.pro
HEADERS = form.h FORMS = form.ui SOURCES = form.cpp \ main.cpp
qmake-qt4
Vznikne Makefile
make
main.cc
#include <QApplication> #include "form.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); MyForm win; win.show(); return app.exec(); }
form.h
#ifndef MY_FORM_H #define MY_FORM_H #include "ui_form.h" class MyForm : public QMainWindow, Ui::BasicWindow { Q_OBJECT public: MyForm(QWidget *parent = 0); private slots: // void on_inputSpinBox1_valueChanged(int value); // void on_inputSpinBox2_valueChanged(int value); }; #endif
form.cpp
#include <QtGui> #include "form.h" MyForm::MyForm(QWidget *parent) : QMainWindow (parent), Ui::BasicWindow () { setupUi(this); }
qt4.txt · Last modified: 2009/04/15 14:13 by 127.0.0.1