hi,
happy new year.

I have a question about QThread. This blog post http://labs.qt.nokia.com/2010/06/17/...oing-it-wrong/ says that it is wrong to subclass QThread. O i'm trying to do it this way:

1) I have a MainWindow class with slot dbInitFinished
2) i have a class DbManager with slot init(), which is a "long" running operation, and need to be run in separate thread

My code looks like this:
Code:
   dialog = new QProgressDialog();
    dialog->setLabelText("Wait, db initing");
    dialog->setMinimum(0);
    dialog->setMaximum(0);
    dialog->setWindowModality(Qt::WindowModal);
    dialog->showMaximized();

    dbManager = new DbManager();
     QThread* t = new QThread();
     connect(t,SIGNAL(started()),dbManager,SLOT(init()));
     connect(t,SIGNAL(finished()),this,SLOT(dbInitFinished()), Qt::DirectConnection);
     dbManager->moveToThread(t);
     t->start();

but
a) Progress dialog is never shown
b) dbInitFinished is never called

What am i doing wrong?