> 133 + def get_toolbar_button(self, button_idx): > 134 + toolbar = self.app.select_single("Toolbar") > 135 + item = toolbar.get_children_by_type("QQuickItem")[0] > 136 + row = item.get_children_by_type("QQuickRow")[0] > 137 + button_loaders = row.get_children_by_type("QQuickLoader") > 138 + button_loader = button_loaders[button_idx] > 139 + return button_loader > > This can be greatly simplified: > > def get_toolbar_button(self, button_idx): > toolbar = self.app.select_single("Toolbar") > row = toolbar.select_single("QQuickRow") > buttons = row.select_many("Button") > return buttons[button_idx]
Done. Tested the change as well.
« Back to merge proposal
> 133 + def get_toolbar_ button( self, button_idx): select_ single( "Toolbar" ) get_children_ by_type( "QQuickItem" )[0] children_ by_type( "QQuickRow" )[0] children_ by_type( "QQuickLoader" ) loaders[ button_ idx] button( self, button_idx): select_ single( "Toolbar" ) select_ single( "QQuickRow" ) many("Button" )
> 134 + toolbar = self.app.
> 135 + item = toolbar.
> 136 + row = item.get_
> 137 + button_loaders = row.get_
> 138 + button_loader = button_
> 139 + return button_loader
>
> This can be greatly simplified:
>
> def get_toolbar_
> toolbar = self.app.
> row = toolbar.
> buttons = row.select_
> return buttons[button_idx]
Done. Tested the change as well.