Hi guys, this is more of a class pointer and C++ but anyway. I created a window with a widget in Qt and also added a horizontal slider widget to the main window as well. My widget is an OpenGL widget and I want to be able to control an object in the OpenGL window using the slider. I went into the default constructor of the window and added the connect code:

Qt Code:
  1. connect(ui->horizontalSlider, SIGNAL(valueChanged(int)), *GLWidget, SLOT(setAngle int angle))
To copy to clipboard, switch view to plain text mode 

However I'm not really familiar with class pointers in projects with multiple files (very confused as to which files are accessed first, which second when the main window pops up and calls subsequent stuff). My understanding is that to use a class pointer, you need to first create the class pointer and assign a value to it just like any other pointer. However, in my case, I'm trying to send a value from my slider widget to an object which should already exist? Simply writing *GLWidget in the connect function doesn't seem to be able to have the program recognise the existence of my GLWidget - I don't get the auto pop up of the available slots for my GLWidget class i.e.

Qt Code:
  1. SLOT(... nothing pops up)
To copy to clipboard, switch view to plain text mode