How can given widget access it's oldest parent, which is top level widget.
I need to .showMinimized()
it.
Now I am using
self.parent().parent().parent().showMinimized()
But it seem not to be the best way for this.
If it it moved, I need to change number of parent manually.
Is there a way to access top level widget?
If you're just trying to get to the window widget, there's QWidget.window().
self.window().showMinimized()
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