24 @param parent parent widget of this dialog (QWidget) |
24 @param parent parent widget of this dialog (QWidget) |
25 """ |
25 """ |
26 super().__init__(parent) |
26 super().__init__(parent) |
27 |
27 |
28 self.TemplateMultipleVariablesDialogLayout = QVBoxLayout(self) |
28 self.TemplateMultipleVariablesDialogLayout = QVBoxLayout(self) |
29 self.TemplateMultipleVariablesDialogLayout.setMargin(6) |
29 self.TemplateMultipleVariablesDialogLayout.setContentsMargins(6, 6, 6, 6) |
30 self.TemplateMultipleVariablesDialogLayout.setSpacing(6) |
30 self.TemplateMultipleVariablesDialogLayout.setSpacing(6) |
31 self.TemplateMultipleVariablesDialogLayout.setObjectName( |
31 self.TemplateMultipleVariablesDialogLayout.setObjectName( |
32 "TemplateMultipleVariablesDialogLayout") |
32 "TemplateMultipleVariablesDialogLayout") |
33 self.setLayout(self.TemplateMultipleVariablesDialogLayout) |
33 self.setLayout(self.TemplateMultipleVariablesDialogLayout) |
34 |
34 |
41 self.variablesView.setFrameStyle(QFrame.NoFrame) |
41 self.variablesView.setFrameStyle(QFrame.NoFrame) |
42 |
42 |
43 self.top = QWidget(self) |
43 self.top = QWidget(self) |
44 self.variablesView.setWidget(self.top) |
44 self.variablesView.setWidget(self.top) |
45 self.grid = QGridLayout(self.top) |
45 self.grid = QGridLayout(self.top) |
46 self.grid.setMargin(0) |
46 self.grid.setContentsMargins(0, 0, 0, 0) |
47 self.grid.setSpacing(6) |
47 self.grid.setSpacing(6) |
48 self.top.setLayout(self.grid) |
48 self.top.setLayout(self.grid) |
49 |
49 |
50 # populate the scrollarea with labels and text edits |
50 # populate the scrollarea with labels and text edits |
51 self.variablesEntries = {} |
51 self.variablesEntries = {} |
71 self.variablesEntries[variables[0]].setFocus() |
71 self.variablesEntries[variables[0]].setFocus() |
72 self.top.adjustSize() |
72 self.top.adjustSize() |
73 |
73 |
74 # generate the buttons |
74 # generate the buttons |
75 layout1 = QHBoxLayout() |
75 layout1 = QHBoxLayout() |
76 layout1.setMargin(0) |
76 layout1.setContentsMargins(0, 0, 0, 0) |
77 layout1.setSpacing(6) |
77 layout1.setSpacing(6) |
78 layout1.setObjectName("layout1") |
78 layout1.setObjectName("layout1") |
79 |
79 |
80 spacer1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) |
80 spacer1 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) |
81 layout1.addItem(spacer1) |
81 layout1.addItem(spacer1) |