Python Forum
Import a file and show file name on qcombobox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import a file and show file name on qcombobox
#1
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()
Reply
#2
since signal emitted during import, connect the emitted signal to a slot and create necessary functions to update the imported data at list.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Video [PyQt] Get a executable file (.exe) from a .py file add a promoted class in a QWidget MiguelonReyes 0 614 Oct-17-2023, 11:43 PM
Last Post: MiguelonReyes
  [PyQt] How do I display the DB table I will choose from the QComboBox in QTableWidget JokerSob 2 2,271 Aug-05-2021, 03:00 PM
Last Post: JokerSob
  [PyQt] display content from left to right in QComboBox or QLineEdit mart79 2 2,250 May-30-2020, 04:38 PM
Last Post: Axel_Erfurt
  QComboBox doesn't display selection as long as it has not lost the focus Meaulnes 3 3,147 May-07-2020, 03:42 PM
Last Post: Meaulnes
  QComboBox for PyQt code gvin47 3 2,051 Apr-22-2020, 04:01 PM
Last Post: gvin47
  [Tkinter] Tkinter - I need to read file excel from GUI app to script file johnjh 0 10,671 Apr-17-2020, 08:14 PM
Last Post: johnjh
  [PyQt] Import Excel file and use pandas WBPYTHON 2 5,606 Mar-22-2020, 11:28 AM
Last Post: WBPYTHON
  [Tkinter] How to get the name of a file only from a file path ? DT2000 4 10,257 Jul-25-2019, 08:27 PM
Last Post: DT2000
  [PyQt] PyQt4 dynamic QComboBox littleGreenDude 4 5,602 Jan-02-2019, 07:22 PM
Last Post: littleGreenDude
  PyQt5 - import rext from other file - despearte for help D_frucht 1 2,447 May-26-2018, 06:37 AM
Last Post: Barrowman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020