diff options
Diffstat (limited to 'share/qtcreator/templates/wizards/classes/python/file.py')
-rw-r--r-- | share/qtcreator/templates/wizards/classes/python/file.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/share/qtcreator/templates/wizards/classes/python/file.py b/share/qtcreator/templates/wizards/classes/python/file.py index adcbc1ed2d..5698022dd8 100644 --- a/share/qtcreator/templates/wizards/classes/python/file.py +++ b/share/qtcreator/templates/wizards/classes/python/file.py @@ -21,6 +21,7 @@ from PyQt5 import QtQuick @endif @endif + @if '%{Base}' class %{Class}(%{Base}): @else @@ -29,11 +30,9 @@ class %{Class}: def __init__(self): @if '%{Base}' === 'QWidget' QtWidgets.QWidget.__init__(self) -@endif -@if '%{Base}' === 'QMainWindow' +@elif '%{Base}' === 'QMainWindow' QtWidgets.QMainWindow.__init__(self) -@if '%{Base}' === 'QQuickItem' +@elif '%{Base}' === 'QQuickItem' QtQuick.QQuickItem.__init__(self) @endif pass - |