Re: Problem accesing widgets
Code:
void accion() {
QString text
= ui
->direccionLE
->text
();
}
You are defining here a global finction wich has nothing to do with your class Cliente.
You should do it like this:
Code:
void Cliente::accion() {
QString text
= ui
->direccionLE
->text
();
}
Notice that "Cliente::" before "accion()", in simple way - it's necessary to tell that your accion() is from Cliente class (I hope you declared it in class declaration...)
Anyway, these are basics of C++ language so get some C++ book/tutorial.
Re: Problem accesing widgets
Thank you very much.
now everything builds and compiles fine but...
Code:
void Cliente::accion(){
ui->direccionLE->setText("Some Text");
ui->consulta1L->setText("text");
ui->consulta1LE->setText("prueba");
}
when I try my code it does't seem to change the values in the ui, why's that?
Re: Problem accesing widgets
what do u mean by "try my code" ?
You have connected accion with ui->conectarB. Are you pressing the button ?
Re: Problem accesing widgets
Ok, by try I mean, when I execute the code and press the button connected to the function nothing changes in the QlineEdits and labesl that are supposed to change.