Ok, the long awaited config wizard is here (at least in a very basic state). There...
[quassel.git] / src / contrib / libqxt-2007-10-24 / tests / slotjob / main.cpp
1 #include <QApplication>
2 #include <QDebug>
3 #include <QThread>
4 class Q43Thread : public QThread{public:void run(){exec();}}; /// qt < 4.3 backwards compatibility
5
6 #include <QxtSlotJob>
7 #include <QxtFuture>
8
9
10 class Bla : public QObject
11 {
12 Q_OBJECT
13 public slots:
14     QString say(QString a)
15     {
16         qDebug()<<a;
17         return a;
18     }
19 };
20
21 int main(int argc,char **argv)
22 {
23     QApplication app(argc,argv);
24
25     Q43Thread thread;
26     thread.start();
27     Bla q;
28     QxtFuture f= QxtSlotJob::detach(&thread,&q,SLOT(say(QString)),Q_ARG(QString, "hi"));
29     qDebug()<<"result is: "<<f.delayedResult(3000);
30     thread.quit();
31     thread.wait();
32     return 0;
33 }
34
35 #include "main.moc"