aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/templates/wizards/classes/python/file.py
blob: 5698022dd85592766e3fc3274c5118d64973ef37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This Python file uses the following encoding: utf-8
@if '%{Module}' === 'PySide2'
    @if '%{ImportQtCore}'
from PySide2 import QtCore
    @endif
    @if '%{ImportQtWidgets}'
from PySide2 import QtWidgets
    @endif
    @if '%{ImportQtQuick}'
from PySide2 import QtQuick
    @endif
@else
    @if '%{ImportQtCore}'
from PyQt5 import QtCore
    @endif
    @if '%{ImportQtWidgets}'
from PyQt5 import QtWidgets
    @endif
    @if '%{ImportQtQuick}'
from PyQt5 import QtQuick
    @endif
@endif


@if '%{Base}'
class %{Class}(%{Base}):
@else
class %{Class}:
@endif
    def __init__(self):
@if '%{Base}' === 'QWidget'
        QtWidgets.QWidget.__init__(self)
@elif '%{Base}' === 'QMainWindow'
        QtWidgets.QMainWindow.__init__(self)
@elif '%{Base}' === 'QQuickItem'
        QtQuick.QQuickItem.__init__(self)
@endif
        pass