GUI Add/delete row button for table widget
Unsolved
General and Desktop
-
Hi, I have a code for a GUI that has a table widget, and I'm trying to add buttons that can add and delete a row for that table. Does anyone know how to do this? Here is the code below:
ChemistryDataTable = QtWidgets.QTableWidget()
ChemistryDataTable.setRowCount(6)
ChemistryDataTable.setColumnCount(5)
ChemistryDataTable.setHorizontalHeaderLabels(["Name", "wt (%)", "T (K)","H (cals/mol)","Xi"])
for i in range(6):
for j in range(5):
ChemistryDataTable.setItem(i,j,QtWidgets.QTableWidgetItem())
layout = QtWidgets.QHBoxLayout()
layout.addWidget(ChemistryDataTable)
tab_layout.addLayout(layout) -
Hi and welcome to devnet,
Where exactly do you store them ?