Quote Originally Posted by 0backbone0 View Post
Both versions are working.
You can even write the first one without "this".

Your orginal problem was that the local variable "hid" the member (local scope is resolved before instance scope).

Quote Originally Posted by 0backbone0 View Post
You wrote "or even better"
Why so?
It is just good practise to use the initialization list for its intended purpose.
A const member can only be initialized that way, a complex member might be not be default constructible or doing so would be a waste if it is overwritten right after.

Quote Originally Posted by 0backbone0 View Post
The fist approach make indexhandler a Member of MainWindow, rigth?
Is this also the case with the second approach?
Neither "makes" it a member, declaring it as a member makes it a member.

Cheers,
_