总是提示:playerDialog.h:8: error:expect ‘)’before ‘*’token 。playerDialog(Qwidget *parent=0);这一行有错、到底是什么原因呢?怎么都看不出来,请高手指点一下
//playerDialog.h文件
#ifndef PLAYERDIALOG_H
#define PLAYERDIALOG_H
#include<QtGui>
class playerDialog:public QDialog
{
// Q_OBJECT
public:
playerDialog(Qwidget *parent=0);
private:
QPushButton *startPushButton;
};
#endif
//playerDialog.cpp文件
#include"playerDialog.h"
playerDialog::playerDialog(Qwidget *parent)
:QDialog(parent)
{
setWindowTitle(tr("MP3"));
setFixedHeight(sizeHint().height());
startPushButton = new QPushButton(tr("start"));
connect(startPushButton,SIGNAL(clicked()),this,SLOT(close()));
}
//main.cpp文件
#include<QApplication>
#include"playerDialog.h"
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
playerDialog *player=new playerDialog;
player->show();
return app.exec();
}