Python Forum
Import a file and show file name on qcombobox - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Import a file and show file name on qcombobox (/thread-27960.html)



Import a file and show file name on qcombobox - GMCobraz - Jun-29-2020

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()



RE: Import a file and show file name on qcombobox - GMCobraz - Jul-02-2020

since signal emitted during import, connect the emitted signal to a slot and create necessary functions to update the imported data at list.