diff --git a/example/qt-ui/Jamfile b/example/qt-ui/Jamfile new file mode 100644 index 000000000..c1846aaaf --- /dev/null +++ b/example/qt-ui/Jamfile @@ -0,0 +1,2 @@ + +exe hello : main.cpp hello_world_widget.ui : qt ; \ No newline at end of file diff --git a/example/qt-ui/hello_world.pro b/example/qt-ui/hello_world.pro new file mode 100644 index 000000000..6b6891e7e --- /dev/null +++ b/example/qt-ui/hello_world.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +TARGET = helloworld +CONFIG += qt warn_on debug +SOURCES += main.cpp +FORMS = hello_world_widget.ui +OBJECTS_DIR = foo diff --git a/example/qt-ui/hello_world_widget.ui b/example/qt-ui/hello_world_widget.ui new file mode 100644 index 000000000..c9c97a084 --- /dev/null +++ b/example/qt-ui/hello_world_widget.ui @@ -0,0 +1,55 @@ + +HelloWorldWidget + + + HelloWorldWidget + + + + 0 + 0 + 124 + 63 + + + + Hello World! + + + + TextLabel2 + + + + 11 + 11 + 102 + 16 + + + + Hello World! + + + AlignCenter + + + + + OkButton + + + + 10 + 40 + 101 + 21 + + + + OK + + + + + diff --git a/example/qt-ui/main.cpp b/example/qt-ui/main.cpp new file mode 100644 index 000000000..c455b36e5 --- /dev/null +++ b/example/qt-ui/main.cpp @@ -0,0 +1,13 @@ +#include "hello_world_widget.h" +#include + +#include + +int main(int argc, char **argv) { + QApplication a(argc, argv); + HelloWorldWidget w; + QObject::connect(static_cast(w.OkButton), SIGNAL(clicked()), &w, SLOT(close())); + a.setMainWidget(&w); + w.show(); + return a.exec(); +} diff --git a/example/qt-ui/project-root.jam b/example/qt-ui/project-root.jam new file mode 100644 index 000000000..82d9c7c1b --- /dev/null +++ b/example/qt-ui/project-root.jam @@ -0,0 +1,10 @@ + +import gcc ; +import toolset ; + +# Tell that QT should be used. QTDIR will give installation +# prefix. +toolset.using qt ; + +#Alternatively, the prefix can be given as second argument +#toolset.using qt : /usr/share/qt ; \ No newline at end of file diff --git a/examples-v2/qt-ui/Jamfile b/examples-v2/qt-ui/Jamfile new file mode 100644 index 000000000..c1846aaaf --- /dev/null +++ b/examples-v2/qt-ui/Jamfile @@ -0,0 +1,2 @@ + +exe hello : main.cpp hello_world_widget.ui : qt ; \ No newline at end of file diff --git a/examples-v2/qt-ui/hello_world.pro b/examples-v2/qt-ui/hello_world.pro new file mode 100644 index 000000000..6b6891e7e --- /dev/null +++ b/examples-v2/qt-ui/hello_world.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +TARGET = helloworld +CONFIG += qt warn_on debug +SOURCES += main.cpp +FORMS = hello_world_widget.ui +OBJECTS_DIR = foo diff --git a/examples-v2/qt-ui/hello_world_widget.ui b/examples-v2/qt-ui/hello_world_widget.ui new file mode 100644 index 000000000..c9c97a084 --- /dev/null +++ b/examples-v2/qt-ui/hello_world_widget.ui @@ -0,0 +1,55 @@ + +HelloWorldWidget + + + HelloWorldWidget + + + + 0 + 0 + 124 + 63 + + + + Hello World! + + + + TextLabel2 + + + + 11 + 11 + 102 + 16 + + + + Hello World! + + + AlignCenter + + + + + OkButton + + + + 10 + 40 + 101 + 21 + + + + OK + + + + + diff --git a/examples-v2/qt-ui/main.cpp b/examples-v2/qt-ui/main.cpp new file mode 100644 index 000000000..c455b36e5 --- /dev/null +++ b/examples-v2/qt-ui/main.cpp @@ -0,0 +1,13 @@ +#include "hello_world_widget.h" +#include + +#include + +int main(int argc, char **argv) { + QApplication a(argc, argv); + HelloWorldWidget w; + QObject::connect(static_cast(w.OkButton), SIGNAL(clicked()), &w, SLOT(close())); + a.setMainWidget(&w); + w.show(); + return a.exec(); +} diff --git a/examples-v2/qt-ui/project-root.jam b/examples-v2/qt-ui/project-root.jam new file mode 100644 index 000000000..82d9c7c1b --- /dev/null +++ b/examples-v2/qt-ui/project-root.jam @@ -0,0 +1,10 @@ + +import gcc ; +import toolset ; + +# Tell that QT should be used. QTDIR will give installation +# prefix. +toolset.using qt ; + +#Alternatively, the prefix can be given as second argument +#toolset.using qt : /usr/share/qt ; \ No newline at end of file