diff options
author | Priyam Nayak | 2020-12-10 17:50:35 +0530 |
---|---|---|
committer | GitHub | 2020-12-10 17:50:35 +0530 |
commit | 4e96691bc758904e05d0e03f0368dcbcd1efaec3 (patch) | |
tree | d5de378e04ab07ad8f3d31e82ca4cd90c307de8d /DockWidgets/DockWidget.py | |
parent | c2717ef3d507858dd73a82c3b16b60dbc2ca98d3 (diff) | |
parent | b9b3b6c1d78cc184b7ca73fa3c65cf9186dcfa83 (diff) | |
download | Chemical-Simulator-GUI-4e96691bc758904e05d0e03f0368dcbcd1efaec3.tar.gz Chemical-Simulator-GUI-4e96691bc758904e05d0e03f0368dcbcd1efaec3.tar.bz2 Chemical-Simulator-GUI-4e96691bc758904e05d0e03f0368dcbcd1efaec3.zip |
Merge pull request #10 from pravindalve/master
Fixes for issue #6
Diffstat (limited to 'DockWidgets/DockWidget.py')
-rw-r--r-- | DockWidgets/DockWidget.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/DockWidgets/DockWidget.py b/DockWidgets/DockWidget.py index b3845bb..b3997f3 100644 --- a/DockWidgets/DockWidget.py +++ b/DockWidgets/DockWidget.py @@ -59,15 +59,13 @@ class DockWidget(QDockWidget,ui_dialog): print(i) if i == None: continue - l = QLineEdit() - if self.input_dict[i] != None: - l.setText(str(self.input_dict[i])) + l = QLineEdit(self.obj.variables[i]['value']) lay = QGridLayout() - lay.addWidget(QLabel(self.obj.variables[i]['name']+":"),0,0, alignment=Qt.AlignLeft) + lay.addWidget(QLabel(self.obj.variables[i]['name']+":"),0,0, alignment=Qt.AlignLeft) lay.addWidget(l,0,1, alignment=Qt.AlignCenter) lay.addWidget(QLabel(self.obj.variables[i]['unit']),0,2, alignment=Qt.AlignCenter) self.formLayout.addRow(lay) - self.input_dict[i] = l + self.input_dict[i] = l except Exception as e: print(e) @@ -132,7 +130,16 @@ class DockWidget(QDockWidget,ui_dialog): self.tableWidget.setItem(rowPosition , 2, QTableWidgetItem(obj.variables[val]['unit'])) self.tableWidget.resizeColumnsToContents() + # Updating result in class + obj.variables[val]['value'] = resultval + # try: + # if obj.type == "Heater": + # print(obj.variables[val]['name'] + str(obj.variables[val]['value'])) + # except Exception as e: + # print(e) + + + except Exception as e: print(e) -
\ No newline at end of file |