Skip to content

Commit 815835f

Browse files
committed
qt-cli: Bug fix on Python project template
Fixed wrong class name and import name generation. Task-number: [VSCODEEXT-239](https://bugreports.qt.io/browse/VSCODEEXT-239)
1 parent eae0457 commit 815835f

File tree

1 file changed

+3
-3
lines changed
  • qt-cli/src/assets/templates/projects/python/qwidget

1 file changed

+3
-3
lines changed

qt-cli/src/assets/templates/projects/python/qwidget/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Important:
77
# You need to run the following command to generate the ui_form.py file
88
# pyside6-uic form.ui -o ui_form.py
9-
from ui_form import Ui_Widget
9+
from ui_form import Ui_{{ .className }}
1010
{{- end }}
1111

1212

@@ -15,13 +15,13 @@ def __init__(self, parent=None):
1515
super().__init__(parent)
1616

1717
{{- if .useForm }}
18-
self.ui = Ui_Widget()
18+
self.ui = Ui_{{ .className }}()
1919
self.ui.setupUi(self)
2020
{{- end }}
2121

2222

2323
if __name__ == "__main__":
2424
app = QApplication(sys.argv)
25-
widget = Widget()
25+
widget = {{ .className }}()
2626
widget.show()
2727
sys.exit(app.exec())

0 commit comments

Comments
 (0)