Good afternoon everyone! I need each qLinedit row to be numbered in ascending order from 1 to 24, I created a qLabel for this, but I do not know how to make it change the numbering according to each line, I could only print a lot of [i] as shown the image [here] 1 . What can I do?
self.ql_coords = {}
self.num = {}
#nós
lo_nodes = qg.QGridLayout()
#no = qg.Qlabel('Node')
x = qg.QLabel('x:')
y = qg.QLabel('y:')
z = qg.QLabel('z:')
for i in range(0,24):
self.num[str(i+1)+str(0)] = qg.QLabel('[i]') #cria a qlabel
lo_nodes.addWidget(self.num[str(i+1)+str(0)], i+1, 0) #adiciona a qlabel ao layout
for j in range(1,4):
self.ql_coords[str(i)+str(j)] = qg.QLineEdit() #cria as qlineedits
lo_nodes.addWidget(self.ql_coords[str(i)+str(j)], i+1, j) #adiciona as qlineedits ao layout
lo_nodes.addWidget(x, 0, 1)
lo_nodes.addWidget(y, 0 ,2)
lo_nodes.addWidget(z, 0, 3)