Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
incomplete example of Jamroot with Qt4
- Loading branch information
1 parent
1ca09cb
commit 4c0b4b9
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using qt : / : /usr/bin : /usr/include/qt4 : /usr/lib ; | ||
|
||
import qt4 ; | ||
if ! [ qt4.initialized ] | ||
{ | ||
ECHO "Warning: Qt4 not initialized in user-config.jam" ; | ||
exit ; | ||
} | ||
|
||
import cast ; | ||
|
||
# project : requirements <threading>multi ; | ||
|
||
exe main | ||
: | ||
main.cpp | ||
[ cast moc/main.moc moccable-cpp : main.h ] | ||
/qt//QtGui | ||
: | ||
<cxxflags>-idirafter=/usr/include/qt4/QtGui/ | ||
<cxxflags>-idirafter=/usr/include/qt4/ | ||
# TODO BAD | ||
<cxxflags>-Ibin/gcc-4.9.1/debug/threading-multi/ | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright Vladimir Prus 2005. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt | ||
// or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#include "main.h" | ||
|
||
#include <iostream> | ||
|
||
My_widget ::My_widget() : QWidget() | ||
{ | ||
QPushButton* b = new QPushButton("Push me", this); | ||
|
||
connect(b, SIGNAL(clicked()), this, SLOT(theSlot())); | ||
} | ||
|
||
void My_widget ::theSlot() | ||
{ | ||
std::cout << "Clicked\n"; | ||
} | ||
|
||
int main(int ac, char* av[]) | ||
{ | ||
QApplication app(ac, av); | ||
My_widget mw; | ||
mw.show(); | ||
app.exec(); | ||
} | ||
|
||
#include "main.moc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef AA | ||
#define AA | ||
|
||
#include <qwidget.h> | ||
#include <qpushbutton.h> | ||
#include <qapplication.h> | ||
|
||
class My_widget : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
My_widget(); | ||
|
||
private slots: | ||
void theSlot(); | ||
|
||
}; | ||
|
||
#endif |