Kartikey singh
Kartikey singh

Reputation: 103

What this statement in qt c++ does?

I'm learning qt framework for c++ and I'm not able to understand what this statement does:

Window::Window (QWidget *parent) : QWidget(parent) { .... }

// (QWidget *parent) : QWidget(parent) <---

Upvotes: 0

Views: 40

Answers (1)

Alex Aparin
Alex Aparin

Reputation: 4522

This statement means calling base class constructor. In your context it is widget class. It is base class for window. Actually parent widget will be passed to this constructor

Upvotes: 1

Related Questions