problems compiling an application...

Michael Haeckel Michael at Haeckel.Net
Tue Jul 25 06:49:12 BST 2000


Am Die, 25 Jul 2000 schrieb Juan Luis Baptiste:
> Hi, I'm developing an aplication but I'm getting this error at
> compilation time:
>
> nula.cpp: In method 'void Nula::addWidgets(KApplication *)':
> dialogoprincipal.h:42:'dialogoPrincipal::dialogoPrincipal(QWidget
> *parent=0,
> const char *name=0)' is protected
> nula.cpp:34:within this context
>
> Line 42 of dialogoprincipal.h is:
> protected:
> dialogoPrincipal(QWidget *parent=0, const char *name=0); <---
>
> and line 34 of nula.cpp is:
> void Nula::addWidgets(KApplication *a){
> dialogoPrincipal *dialogoPrin= new dialogoPrincipal(this,"Widgets");
> <---
> }

You have to make the constructor dialogoPrincipal public in order to be
able to access it from outside the class. protected methods can only be
accessed from inside the class.

Regards,
Michael Häckel




More information about the KDevelop mailing list