Skip to content

Commit 83d112c

Browse files
committed
PluginGenerator: Template fixes
1 parent 1939e81 commit 83d112c

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

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

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

14+
layout = QVBoxLayout()
1415
layout.addWidget(label)
1516

16-
self.setLayout(layout)
17-
17+
self.layout().addItem(layout)
18+
1819

1920

2021
def canvasChanged(self, canvas):

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ 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-
layout = QVBoxLayout()
13-
layout.addWidget(self.centralWidget)
14-
15-
self.setLayout(layout)
12+
self.setWidget(self.centralWidget)
1613

1714
def canvasChanged(self, canvas):
1815
pass

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def __init__(self):
1010
label.setAlignment(Qt.AlignCenter)
1111
label.setText("Hello World")
1212

13+
layout = QVBoxLayout()
1314
layout.addWidget(label)
1415

1516
self.setLayout(layout)

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ 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-
layout = QVBoxLayout()
12-
layout.addWidget(self.centralWidget)
13-
14-
self.setLayout(layout)
11+
self.setWidget(self.centralWidget)
1512

1613
class '''[%SHORTNAME%]'''(Extension):
1714

0 commit comments

Comments
 (0)