Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
The "this" keyword
-
when do one put the "this" keyword for widget parent constructors?
-
if you omit
this
, the widget get´s reparent tothis
automaticly. You only have to give a parent, if the parent should not bethis
.
-
Hi,
@sneubert that's wrong, there's no automatic reparenting done by default.
What can happen, and that's the usual case, is that you put your widget A in a layout inside widget B, and in that case, there's reparenting done.
@Celf-Inifinite You would usually do that if you are managing your widget A's size and position inside widget B yourself for whatever reason fits your needs.
-
This post is deleted!
-
thanks sgaist, i really thougth this would happen all the time