PDA

View Full Version : Signal and "already defined" error



QPlace
3rd June 2009, 05:46
I have a strange problem: there is a method "onprogress" in the class below. During link I am getting an error of it being already defined. When I remove "signals:" keyword it compiles OK. What might be the offence? (Windows, vs2008)


class btprogress : public QDialog
{
Q_OBJECT

public:
btprogress (nbt& nt, boost::gregorian::date mindate, boost::gregorian::date maxdate,
QWidget*parent = 0);
~btprogress();

signals:
void onprogress(QString date);

private slots:
void onbtcanceled();
void oncancel();
}

aamer4yu
3rd June 2009, 06:16
Check your code for onprogress texts,, may be you are defining it elsewhere too.
BTW, in you code does the class have semi colon at end ?

nish
3rd June 2009, 07:15
try to rename the signal.

QPlace
4th June 2009, 03:06
Thank you guys, for the help.

Yes, there is a semicolon at the end. No, there is no "onprogress" method/free function/etc anywhere in the project. I will rename signal and see what happens.