Qt Code:
  1. void accion() {
  2. QString text = ui->direccionLE->text();
  3.  
  4. }
To copy to clipboard, switch view to plain text mode 
You are defining here a global finction wich has nothing to do with your class Cliente.

You should do it like this:
Qt Code:
  1. void Cliente::accion() {
  2. QString text = ui->direccionLE->text();
  3. }
To copy to clipboard, switch view to plain text mode 
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.