I have a pice of code that looks like this...

Qt Code:
  1. ...
  2. QString str;
  3.  
  4. t1 = new QLineEdit();
  5. str = "hi to everybody";
  6.  
  7. t1->setText(str);
  8. ...
To copy to clipboard, switch view to plain text mode 

After the execution of "t1->setText(str);" the program breaks with a segmentation fault error.

Probably I am doing something very badly.

Thank you for your help

BTW: the code compiles without any error