LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Where's the syntax error (https://www.linuxquestions.org/questions/programming-9/wheres-the-syntax-error-209068/)

tamtam 07-24-2004 07:16 AM

Where's the syntax error
 
Hi people,

I am having a problem locating the syntax error in a peice of code I have compiled in QT3 designer with qmake. The error is as follows...


In file included from .ui/conversionform.cpp:25:
conversionform.ui.h: In member function `void ConversionForm::init()':
conversionform.ui.h:67: error: syntax error before `(' token
make: *** [.obj/conversionform.o] Error 1

The code for the ::init() member function is below...

Code:

void ConversionForm::init()
{
        numberLineEdit->setValidator( new QDoubleValidator(numberLineEdit ) );
        numberLineEdit->setText( "10" );
        convert();
        numberLineEdit->selectAll();
}

line 67 is..
numberLineEdit->setValidator( new QDoubleValidator(numberLineEdit ) );

anyone out there with qt3 experience spot the error. I have experience of C++, but this is my first effort at designing a program with qt3. I have searched high and low for the error but can't find it. This is the example that comes with the documentation.

Any help appreciated.
TamTam.

SBing 07-24-2004 07:23 AM

Have you included qvalidator.h ?

tamtam 07-24-2004 09:07 AM

Thanks SBing, it's always the glaringly obvious.

Tam


All times are GMT -5. The time now is 04:00 AM.