diff options
Diffstat (limited to 'share/qtcreator/templates/wizards/classes')
-rw-r--r-- | share/qtcreator/templates/wizards/classes/python/file.py | 7 | ||||
-rw-r--r-- | share/qtcreator/templates/wizards/classes/python/wizard.json | 2 |
2 files changed, 4 insertions, 5 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 - diff --git a/share/qtcreator/templates/wizards/classes/python/wizard.json b/share/qtcreator/templates/wizards/classes/python/wizard.json index 552c3f15a0..aeebd1f2a3 100644 --- a/share/qtcreator/templates/wizards/classes/python/wizard.json +++ b/share/qtcreator/templates/wizards/classes/python/wizard.json @@ -46,7 +46,7 @@ "data": { "items": [ { "trKey": "<Custom>", "value": "" }, - "QObject", "QWidget", "QMainWindow", "QDeclarativeItem" ] + "QObject", "QWidget", "QMainWindow", "QDeclarativeItem", "QQuickItem" ] } }, { |