Symbian qt threading

Posted by Umesha MS on Stack Overflow See other posts from Stack Overflow or by Umesha MS
Published on 2010-04-14T06:10:53Z Indexed on 2010/04/14 6:13 UTC
Read the original article Hit count: 385

Filed under:
|
|

Hi,

1) In symbian c++ thread is not recommended. Instead of that they recommend active object for multi tasking. Presently I am using QT to develop a application in symbian. Since there is no active object in QT I thought of using thread. My question is , can I use thread, is it is recommended. If it is not recommended, how to achieve multitasking.

2) I have created a sample thread class as shown bellow. When I call test function from the constructer of the main window thread will start but UI will be in hung state, infact main window itself will not be displayed. Please help me to solve the problem.

class CSampleThread: public QThread

{ Q_OBJECT

public: CSampleThread(QObject *parent = 0) : QThread(parent) {}

virtual ~CSampleThread()
{}

void test(){
    QThread::start(LowPriority);
}

protected:

void run()

{ while(true){}

}

};

© Stack Overflow or respective owner

Related posts about symbian

Related posts about qt