Visually show the different types

master
Salvo 'LtWorf' Tomaselli 2020-08-23 11:16:48 +07:00
parent 4c101526e6
commit 5869f5d421
No known key found for this signature in database
GPG Key ID: B3A7CF0C801886CF
1 changed files with 7 additions and 1 deletions

@ -249,7 +249,13 @@ class relForm(QtWidgets.QMainWindow):
for i in rel.content: for i in rel.content:
item = QtWidgets.QTreeWidgetItem() item = QtWidgets.QTreeWidgetItem()
for j,k in enumerate(i): for j,k in enumerate(i):
item.setText(j, k) if k is None:
item.setBackground(j, QtGui.QBrush(QtCore.Qt.darkRed, QtCore.Qt.Dense4Pattern))
elif isinstance(k, (int, float)):
item.setForeground(j, QtGui.QPalette().link())
elif not isinstance(k, str):
item.setForeground(j, QtGui.QPalette().brightText())
item.setText(j, str(k))
self.ui.table.addTopLevelItem(item) self.ui.table.addTopLevelItem(item)
# Sets columns # Sets columns