Change the background of the row
Unsolved
Qt for Python
-
Dear all,
How can I change the background of the selected row in the table so that I can reset it?Using, for example:
table.item(currentRow, 0).setBackground(QtGui.QColor(182, 252, 189)) table.item(currentRow, 1).setBackground(QtGui.QColor(182, 252, 189))
the basic background color is overwritten irreversibly, and I cannot undo this process.
-
Hi and welcome to devnet,
Store the original color before changing it so you can reuse it when you want to reset the color to default.