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
  [PyQt] display content from left to right in QComboBox or QLineEdit mart79 2 675 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 634 May-07-2020, 03:42 PM
Last Post: Meaulnes
  QComboBox for PyQt code gvin47 3 644 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 4,567 Apr-17-2020, 08:14 PM
Last Post: johnjh
  [PyQt] Import Excel file and use pandas WBPYTHON 2 2,107 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 3,916 Jul-25-2019, 08:27 PM
Last Post: DT2000
  [PyQt] PyQt4 dynamic QComboBox littleGreenDude 4 2,579 Jan-02-2019, 07:22 PM
Last Post: littleGreenDude
  PyQt5 - import rext from other file - despearte for help D_frucht 1 1,289 May-26-2018, 06:37 AM
Last Post: Barrowman
  [PyQt] Get Data from QComboBox Ferris 0 2,013 Feb-28-2018, 04:59 AM
Last Post: Ferris
  [PyQt] How can I get special data from QComboBox()? Sophus 0 3,328 Jul-26-2017, 04:56 PM
Last Post: Sophus

Forum Jump:

User Panel Messages

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