Hi I'm making simple things on a QMainWindow to see how it works, but I once I click a button to do something, nothing seems to change in the main window.
I tried to use repaint() and update() funtions but nothing happens.

And by the way, can someone explain me the difference between repaint() and update()? I understand what means each word, but if I'll use repaint(), the window gonna show the changes too? or I have to use the update() function?

All right to the point, My Code:
Qt Code:
  1. void Window::labels(){
  2.  
  3. example = new QLabel();
  4. example->setText("Ejemplo: ");
  5. acep = new QPushButton();
  6. acep->setText("Aceptar");
  7. linea = new QLineEdit();
  8. linea->resize(10,30);
  9. connect(acep,SIGNAL(clicked()),linea,SLOT(modify()));
  10.  
  11. layoutH = new QHBoxLayout();
  12. layoutH->addSpacing(20);
  13. layoutH->addWidget(example);
  14. layoutH->addSpacing(10);
  15. layoutH->addWidget(acep);
  16. layoutH->addSpacing(20);
  17. layoutH->addWidget(linea);
  18. layoutH->addSpacing(20);
  19. container = new QWidget();
  20. container->setLayout(layoutH);
  21. this->setCentralWidget(container);
  22. }
  23. void Window::modify(){
  24. line = linea->text(); //QString line, QEditLine linea, I know have closely the same name, but Im just testing simple things to see how it works.
  25. line.append('s'); //
  26. linea->setText(line);
  27. linea->repaint(); // I used update too, and with the Window too, but nothing happens
  28. this->update();
  29. }
To copy to clipboard, switch view to plain text mode 

I tried to append a s to the QLineEdit to see if changes it, tried to clear the text too, but nothing happens.
I tried to set the window title with the text given in the QLineEdit, but not working too.