Skip to content

Commit 049d385

Browse files
committed
250708.2
1 parent 04de7ad commit 049d385

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

easycoder/ec_pyside.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,9 @@ def k_createDialog(self, command):
326326
if self.peek() == 'title':
327327
self.nextToken()
328328
title = self.nextValue()
329-
elif self.peek() == 'layout':
329+
elif self.peek() == 'type':
330330
self.nextToken()
331-
if self.nextIsSymbol():
332-
command['layout'] = self.getSymbolRecord()['name']
331+
command['type'] = self.nextToken()
333332
else: break
334333
command['title'] = title
335334
self.add(command)
@@ -462,14 +461,18 @@ def r_createComboBox(self, command, record):
462461
return self.nextPC()
463462

464463
def r_createDialog(self, command, record):
465-
layout = self.getVariable(command['layout'])['widget']
466464
dialog = QDialog()
465+
mainLayout = QVBoxLayout(dialog)
467466
dialog.setWindowTitle(self.getRuntimeValue(command['title']))
467+
dialogType = command['type']
468+
if dialogType in ['lineinput']:
469+
if dialogType == 'lineinput':
470+
input = QLineEdit()
471+
mainLayout.addWidget(input)
468472
dialog.buttonBox = QDialogButtonBox((QDialogButtonBox.Ok | QDialogButtonBox.Cancel))
469473
dialog.buttonBox.accepted.connect(dialog.accept)
470474
dialog.buttonBox.rejected.connect(dialog.reject)
471-
layout.addWidget(dialog.buttonBox)
472-
dialog.setLayout(layout)
475+
mainLayout.addWidget(dialog.buttonBox, alignment=Qt.AlignHCenter)
473476
record['dialog'] = dialog
474477
return self.nextPC()
475478

@@ -948,7 +951,8 @@ def r_show(self, command):
948951
window.show()
949952
elif 'dialog' in command:
950953
dialog = self.getVariable(command['dialog'])['dialog']
951-
dialog.exec()
954+
result = dialog.exec()
955+
# TODO: Finish the dialog box for getting the request relay name
952956
return self.nextPC()
953957

954958
# Start the graphics

0 commit comments

Comments
 (0)