Hello, my problem is:
for example i have a class
Qt Code:
  1. class FooClass{
  2. public:
  3. FooClass();
  4. ~FooClass();
  5.  
  6. private:
  7. QTextEdit* text;
  8. };
  9. FooClass::FooClass(){
  10. text = new QTextEdit;
  11. }
To copy to clipboard, switch view to plain text mode 
and now i want to make thread where i can put something in my FooClass::text fild
Qt Code:
  1. class FooThread : public QThread{
  2. public:
  3. void setTextEdit(QTextEdit* __p);
  4.  
  5. protected:
  6. void run()
  7.  
  8. private:
  9. QTextEdirt* textPointer;
  10. };
  11. void FooThread::setTextEdit(QTextEdit* __p){
  12. this->textPointer = __p
  13. }
  14.  
  15. void FooThread::run(){
  16. this->textPointer->insertPlainText("Hello from QThred");
  17. }
To copy to clipboard, switch view to plain text mode 
my aim is to enter ""Hello from QThred" string into FooClass TextEdit
Qt Code:
  1. FooClass::FooClass(){
  2. text = new QTextEdit;
  3. FooThread *thread = new FooThread;
  4. thread->setTextEdit(this->text);
  5. thread->start();
  6. }
To copy to clipboard, switch view to plain text mode 
but when i do it like this i get runtime error :/