Skip to content

Commit 718f7ba

Browse files
committed
PluginGenerator: More template fixes
1 parent 83d112c commit 718f7ba

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleDockerGUI/[SHORTNAME].py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ def __init__(self):
1111
label.setAlignment(Qt.AlignCenter)
1212
label.setText("Hello World")
1313

14+
self.centralWidget = QWidget()
1415
layout = QVBoxLayout()
1516
layout.addWidget(label)
17+
self.centralWidget.setLayout(layout)
1618

17-
self.layout().addItem(layout)
19+
self.setWidget(self.centralWidget)
1820

1921

2022

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleDockerGUIQML/[SHORTNAME].py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ def __init__(self):
99
self.setWindowTitle("'''[%PLUGINTITLE%]'''")
1010
self.centralWidget = uic.loadUi( os.path.join(os.path.dirname(os.path.realpath(__file__)),"'''[%SHORTNAME%]'''.ui"))
1111

12-
self.setWidget(self.centralWidget)
12+
layout = QVBoxLayout()
13+
layout.addWidget(self.centralWidget)
14+
15+
self.setLayout(layout)
1316

1417
def canvasChanged(self, canvas):
1518
pass

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleExtensionDialogGUIQML/[SHORTNAME].py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ def __init__(self):
88
self.setWindowTitle("'''[%PLUGINTITLE%]'''")
99
self.centralWidget = uic.loadUi( os.path.join(os.path.dirname(os.path.realpath(__file__)),"'''[%SHORTNAME%]'''.ui"))
1010

11-
self.setWidget(self.centralWidget)
11+
layout = QVBoxLayout()
12+
layout.addWidget(self.centralWidget)
13+
14+
self.setLayout(layout)
1215

1316
class '''[%SHORTNAME%]'''(Extension):
1417

0 commit comments

Comments
 (0)