def initialize_window(self): uic.loadUi('resources/ui/add_load.ui', self) for availableBus in self.net.bus.index: self.bus.addItem(str(availableBus))