Python Forum

Full Version: Import a file and show file name on qcombobox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all,

May I get some hints on how to show the filename in qcombobox after import?

The problem that I faced now is, it is imported successfully, but need to close and reopen in order to ssee the imported filename in combobox.

Thanks.

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.ui.imported_data.addItems(self.imported_thermal_data())
    def imported_thermal_data(self):
        return self.battery_df['Battery'].astype(str).values.tolist()
since signal emitted during import, connect the emitted signal to a slot and create necessary functions to update the imported data at list.