Hi all. I'm trying to start the work for issue 1716
(https://github.com/qutebrowser/qutebrowser/issues/1716) and I'm
running into the following problem:

1- In TabbedBrowser's __init__ method, self.widget is set to
"tabwidget.TabWidget(win_id, parent=self)". With pdb, I can verify
immediately after that self.widget.parent() correctly returns the
TabbedBrowser instance.
2- Later, at the point of executing browsertab.create, the TabWidget
instance is passed down as the "parent" argument, but if I do
parent.parent(), I receive a MainWindow instance instead.

I have verified with pdb that in both cases it's the same instance of
TabWidget, and I have re-defined TabWidget.setParent method to make it
throw an exception in case it was being called somewhere, but it is
definitely not.

I basically need to access the TabbedBrowser instance down from an
AbstractTab instance, and this seemed like a clean way of doing so
without passing new arguments to objects constructors.


Reply via email to