diff --git a/relational_gui/guihandler.py b/relational_gui/guihandler.py index da34184..ac4d7a0 100644 --- a/relational_gui/guihandler.py +++ b/relational_gui/guihandler.py @@ -249,7 +249,13 @@ class relForm(QtWidgets.QMainWindow): for i in rel.content: item = QtWidgets.QTreeWidgetItem() 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) # Sets columns