Part 2 - Creating a custom OpenGL widget that will allow you to draw stuff.
Your Task
Your may have noticed that the zoom/scale slider still does nothing aside from making the LCD number change. Your task is to create a slot called setScale(int) by editing glfractal.h and glfractal.cpp. Then you must add this slot to your custom widget in designer. Finally connect the valueChanged(int) signal from your zoom slider to the new setScale(int) slider.


FYI
If you wish to use the glu and glut libraries in your code (for functions that begin with "glu" like "gluOrtho( . . .)") you have to explicitly tell QT to compile with these libraries. To do this go to Project -> Project Settings, then click on the C++ Tab and type in -lglu and -lglut in the Libs text box. The tells qmake to compile with the -lglut tag when it compiles/links/whatever.


Please email me at brosz at cpsc.ucalgary.ca if you have any questions or problems.

John Brosz, September 23, 2003
Slightly updated, January 2008.