Possible Duplicate:
What is this weird colon-member syntax in the constructor?
I see it everywhere in constructors in Qt applications, but I don't know what it's called. I'm trying to find docs about it.
Browser::Browser(QTextBrowser& textBrowser, QObject* parent /*= 0*/)
: // <- What
m_textBrowser(textBrowser), // <- is
QObject(parent) // <- this stuff?
{
}
I apologize for my newbness.
Constructor Initialization list
It's a constructor initialization list
It is a constructor initialization list. In your example, it looks like it's being used to initialize a data member and a base class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With