Hello everyone, I'm trying to develop a GUI to modify and make computation on Pandas DataFrames with the PyQt5 module.
I could actually display my DataFrame, and Edit specific column or not. It's displayed in a QTableWidget.
I tried to implement a QItemDelagate with the QDoubleValidator to write only specifics numbers in cols.
This is my function :
class FloatDelegate(QItemDelegate):
def __init__(self, parent=None):
super().__init__()
def createEditor(self, parent, option, index):
editor = QLineEdit(parent)
editor.setValidator(QDoubleValidator(0.0000, 1.0000, 4))
return editor
.....
#data check float
dataCheckDelege = FloatDelegate(self)
self.setItemDelegateForColumn(3, dataCheckDelege)
I can only write numbers betwenn 0 & 1, that's good for that, i could write flaot with the " , " separator like "0,5".
But i couldn't use " . " SEPARATOR, i couldn't write "0.5", and this is how iI need to write my dattas.
How can I deal with that?