]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/example/qt/qt3/moccable-cpp/main.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / example / qt / qt3 / moccable-cpp / main.cpp
1 // Copyright Vladimir Prus 2005.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE.txt
4 // or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5
6
7 #include <qwidget.h>
8 #include <qpushbutton.h>
9 #include <qapplication.h>
10
11 #include <iostream>
12
13 class My_widget : public QWidget
14 {
15 Q_OBJECT
16 public:
17 My_widget() : QWidget()
18 {
19 QPushButton* b = new QPushButton("Push me", this);
20
21 connect(b, SIGNAL(clicked()), this, SLOT(theSlot()));
22 }
23
24 private slots:
25 void theSlot()
26 {
27 std::cout << "Clicked\n";
28 }
29
30 };
31
32 int main(int ac, char* av[])
33 {
34 QApplication app(ac, av);
35 My_widget mw;
36 mw.show();
37 app.setMainWidget(&mw);
38 app.exec();
39 }
40
41 #include "main.moc"