How come you don't need to use setLayout() method to add your grid layout to your widget? Can you please explain me this, I would appreciate it a lot. Thanks in advance
@darlingtonnkwaze9 ай бұрын
Hi, thank you for your question. In this video, I already made the grid layout a child of the main widget. So, I just had to add the other children of the main widget and position them. Another approach would probably be to create the layout without a parent, then add child widgets to it before setting it as the layout of the main widget. I believe the second approach is what you were expecting. However, I think you won't lose or gain much if you use any of the two approaches. Although, the second approach could be useful when you want different widgets to have the same layout. I hope this helps.