2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-01 08:22:15 +00:00
Files
build/example/qt/main.cpp
Vladimir Prus 3b0b49a6fc Write a new example to avoid lengthy "what is the license" and "how to
refer to the QPL" and "is it OK to have QPL example" discussions.


[SVN r24834]
2004-08-31 06:58:52 +00:00

37 lines
808 B
C++

// Copyright Vladimir Prus 2004.
// 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 "canvas.h"
#include <qapplication.h>
#include <qvbox.h>
#include <qpushbutton.h>
class Window : public QMainWindow
{
public:
Window()
{
setCaption("QCanvas test");
QVBox* vb = new QVBox(this);
setCentralWidget(vb);
Canvas* c = new Canvas(vb);
QPushButton* b = new QPushButton("Change color", vb);
connect(b, SIGNAL(clicked()), c, SLOT(change_color()));
}
};
int main(int argc, char **argv)
{
QApplication app(argc, argv);
Window *w = new Window();
app.setMainWidget(w);
w->show();
return app.exec();
}