#include <QThread>
class myThread : public QThread
{
Q_OBJECT
signals:
downloaded(int);
public:
myThread();
void run()
{
for(int i=0;i<100; i++)
{
//p1->setValue(i);
emit downloaded(i);
QThread::sleep(2);
}
}
};
t2 = new myThread;
t2->start();