The sample code mentioned below is not compiling. Why?
#include "QprogressBar.h"
#include <QtGui>
#include <QApplication>
#include<qprogressbar.h>
#include <qobject.h>
lass myTimer: public QTimer
{
public:
myTimer(QWidget *parent=0):QTimer(parent)
{}
public slots:
void recivetime();
};
void myTimer::recivetime()
{
}
class Progressbar: public QProgressDialog
{
public:
Progressbar(QWidget *parent=0):QProgressDialog(parent)
{
}
};
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QObject::connect(QTimer,SIGNAL(timeout()),QTimer,SLOT(recivetime()));
return a.exec();
}
It is giving me a problem when it tries to connect. I think that maybe it is fine to write the connect code in the main function.