Hi. can someone help me interpret what this means in general?
GLWindow(QWidget *parent)
: QGLWidget(parent) {} //especially this line
The top line is the constructor with it's in parameters, but what does the seccond line mean? and why can't I write
GLWindow::GLWindow(QWidget *parent)
: QGLWidget(parent) {
initializeGL();
}
Means that when I'm Initializing my object I wan't to run my function initializeGL()
Ok. that's true. But if I'd in my cpp file write a body, as eg above shows, visual say that I can't do that since it already has a body. what should I do if I want to write a body for the constructor?
All the function defined in the class body are inlined - as long as the compiler inlines them -
Anyway, that has an empty body {} so it doesn't matter much