summaryrefslogtreecommitdiffstats
path: root/examples/qtapp/main.cpp
blob: 91c40520f5a62b8490facac957dc53a7cf5c6dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "myqt.h"

#include <qapplication.h>
#include <qvbox.h>
#include <qpushbutton.h>

int main(int argc, char **argv)
{
    QApplication a(argc, argv);

    QVBox *v = new QVBox;
    QPushButton *b = new QPushButton("Show w3.bmp !", v);
    MyQT *qt = new MyQT(v);

    QVBox::connect(b, SIGNAL(clicked()), qt, SLOT(bind()));

    v->setStretchFactor(qt, 1);

    a.setMainWidget(v);
    v->resize(512, 256);
    v->show();

    return a.exec();
}