Hello all and thank you for viewing my question:

I have a button (pushButton) in my form MainWindow which I have set up to execute a method by using Go to Slot... in qt designer:

This is the method's body:

Qt Code:
  1. void MainWindow::on_pushButton_clicked()
  2. {
  3. QColor black ("black");
  4. QPen pen (black);
  5. scene->addLine(0,0,250,250,pen);
  6.  
  7. this->ui->graphicsView->scene=scene;
  8.  
  9. }
To copy to clipboard, switch view to plain text mode 
I get a compile time error message in the line, this->ui->graphicsView->scene=scene:
error: invalid use of member (did you forget the '&' ?).

The problem is I am a complete beginner to unmanaged software development so this might a beginners problem with pointers but I tried to search Google and C++ tutorials and other Qt forums but alas no luck.

Please post beginners tips about pointer related conventions you use to prevent pointer problems anyway because I was pulling my hair with pointer problems .
Thank you for helping!!!!!!!!!!!!!!!!!