I am previewing a file in Qtableview and want users to select the column they want to import into a dataframe. this selection is done by listing the column headers in a combobox for easy user selection.
somehow I cannot get the list populated, my code is:
def Define_Combo(self):
self.Com_X = QComboBox(self.Combo_X)
self.Com_X.clear()
self.header = self.table.horizontalHeader()
# self.header = [self.table.horizontalHeader(self, QHeaderView)]
self.Com_X.addItems(self.header)
the error I get is:
self.Com_X.addItems(self.header)
TypeError: addItems(self, Iterable[str]): argument 1 has unexpected type 'QHeaderView'