本文整理汇总了Python中PyQt5.QtWidgets.QMainWindow.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QMainWindow.__init__方法的具体用法?Python QMainWindow.__init__怎么用?Python QMainWindow.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QMainWindow
的用法示例。
在下文中一共展示了QMainWindow.__init__方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, parent):
QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
self.setupUi(self)
self.parent = parent
self.commands = []
self.checkboxes = {
self.a1: [[None], '--always-on-top', 0],
self.a2: [[self.a2c1, self.a2c2], '--crop {}:{}', 1],
self.a3: [[self.a3e1], '--max-fps {}'],
self.a4: [[None], '--prefer-text'],
self.a5: [[self.a5c1], '--push-target {}'],
self.a6: [[self.a6c1], '--record {}'],
self.a8: [[self.a8c1], '--serial {}'],
self.a9: [[None], '--window-borderless'],
self.b0: [[self.b0c1], '--window-title {}'],
self.b1: [[self.b1c1, self.b1c1], '--window-x {} --window-y {}'],
self.b2: [[self.b2c1, self.b2c2],
'--window-width {} --window-height {}'],
}
示例2: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, parent, model, added_node_list):
QStyledItemDelegate.__init__(self, parent)
self.added_node_list = added_node_list
self.model = model
示例3: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self):
Ui_MainWindow.__init__(self)
super().__init__()
self.httpClient = None
self.myurl = '/api'
self.q = self.transInput.text() # 查询的单词
self.fromLang = self.transFrom.currentText() # 源语言
self.toLang = self.transTo.currentText() # 目标语言
self.salt = random.randint(1, 65536) # 随机数
示例4: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self):
QMainWindow.__init__(self)
Ui_MainWindow.__init__(self)
super().__init__()
self.initUI() # 调用自定义的UI初始化函数initUI()
self.initBaiDu()
示例5: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, window, uaclient):
self.window = window
self.uaclient = uaclient
self._handler = EventHandler()
self._subscribed_nodes = [] # FIXME: not really needed
self.model = QStandardItemModel()
self.window.ui.evView.setModel(self.model)
self.window.ui.actionSubscribeEvent.triggered.connect(self._subscribe)
self.window.ui.actionUnsubscribeEvents.triggered.connect(self._unsubscribe)
# context menu
self.window.addAction(self.window.ui.actionSubscribeEvent)
self.window.addAction(self.window.ui.actionUnsubscribeEvents)
self.window.addAction(self.window.ui.actionAddToGraph)
self._handler.event_fired.connect(self._update_event_model, type=Qt.QueuedConnection)
# accept drops
self.model.canDropMimeData = self.canDropMimeData
self.model.dropMimeData = self.dropMimeData
示例6: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self,DATA):
"""Inits DatasetsWindows with a DATA object coming from the main call
in main.py.
The Ui_MainWindow gets set up, the signal slots to the UI buttons get
connected and set_cmd_options() evaluates the parsed arguments of the
main call.
Once a file is opened the handle functions emmit signals as soon as
some user interaction happens (i.e. a dataset is clicked to be opened)
and update_plots() emmits the update signal.
"""
self.DATA = DATA
#QMainWindow.__init__(self,None,Qt.WindowStaysOnTopHint)
QMainWindow.__init__(self)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)
# set up User Interface (widgets, layout...)
self.setupUi(self)
self.setWindowTitle("Qviewkit")
self.treeWidget.setHeaderHidden(True)
self.refreshTime_value = 2000
self.tree_refresh = True
self._setup_signal_slots()
self.setup_timer()
self.set_cmd_options()
示例7: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, capture):
self.capture = capture
self.currentFrame = np.array([])
示例8: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, app):
QMainWindow.__init__(self)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.app = app
self.appVersion = uilib.fileIO.appVersion
self.appVersionStr = uilib.fileIO.appVersionStr
self.app.preferencesManager.preferencesChanged.connect(self.applyPreferences)
self.app.propellantManager.updated.connect(self.propListChanged)
self.motorStatLabels = [self.ui.labelMotorDesignation, self.ui.labelImpulse, self.ui.labelDeliveredISP, self.ui.labelBurnTime,
self.ui.labelAveragePressure, self.ui.labelPeakPressure, self.ui.labelInitialKN, self.ui.labelPeakKN,
self.ui.labelPropellantMass, self.ui.labelPropellantLength, self.ui.labelPortThroatRatio, self.ui.labelPeakMassFlux]
self.app.fileManager.fileNameChanged.connect(self.updateWindowTitle)
self.app.fileManager.newMotor.connect(self.resetOutput)
self.app.importExportManager.motorImported.connect(self.motorImported)
self.app.simulationManager.newSimulationResult.connect(self.updateMotorStats)
self.app.simulationManager.newSimulationResult.connect(self.ui.resultsWidget.showData)
self.aboutDialog = uilib.widgets.aboutDialog.AboutDialog(self.appVersionStr)
self.app.toolManager.setupMenu(self.ui.menuTools)
self.app.toolManager.changeApplied.connect(self.postLoadUpdate)
self.setupMotorStats()
self.setupMotorEditor()
self.setupGrainAddition()
self.setupMenu()
self.setupPropSelector()
self.setupGrainTable()
self.setupGraph()
示例9: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, elements, os, api, url, file, from_vsys, to_vsys, parent=None):
super(IronSkillet, self).__init__(parent)
self.isRunning = True
self.elements = elements
self.os = os
self.api = api
self.url = url
self.file = file
self.from_vsys = from_vsys
self.to_vsys = to_vsys
示例10: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, ux_mapper=None, parent=None, frame=False,
always_on_top=True):
"""
Side panel toolkit for guiscrcpy main window
:param ux_mapper:
:param parent:
:param frame:
:param: always_on_top: bool
"""
QMainWindow.__init__(self)
Ui_ToolbarPanel.__init__(self)
self.name = "toolkit"
self.uid = uuid.uuid4()
self.setupUi(self)
self.parent = parent
self.oldPos = None
self.ux = None
__flags = QtCore.Qt.Window
if not frame:
__flags |= QtCore.Qt.FramelessWindowHint
if always_on_top:
__flags |= QtCore.Qt.WindowStaysOnTopHint
self.setWindowFlags(__flags)
if ux_mapper:
self.ux = ux_mapper
else:
self.ux = UXMapper()
示例11: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self):
QMainWindow.__init__(self)
Ui_HorizontalPanel.__init__(self)
self.setupUi(self)
self.oldpos = self.pos()
self.setWindowFlags(
QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.FramelessWindowHint
)
示例12: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, parent=None, ux_mapper=None, frame=False,
always_on_top=True):
"""
The bottom panel subwindow class for guiscrcpy
:param parent: The caller of the function
:param ux_mapper: The UX Mapper toolkit
:param frame: Boolean (Frame window / Frameless Window)
:param always_on_top: Boolean (always on top)
"""
# noinspection PyArgumentList
QMainWindow.__init__(self)
Ui_HorizontalPanel.__init__(self)
self.name = "panel"
self.uid = uuid.uuid4()
self.setupUi(self)
self.parent = parent
self.oldPos = self.pos()
__flags = QtCore.Qt.Window
if not frame:
__flags |= QtCore.Qt.FramelessWindowHint
if always_on_top:
__flags |= QtCore.Qt.WindowStaysOnTopHint
self.setWindowFlags(__flags)
if ux_mapper:
self.ux = ux_mapper
else:
self.ux = UXMapper()
示例13: __init__
# 需要导入模块: from PyQt5.QtWidgets import QMainWindow [as 别名]
# 或者: from PyQt5.QtWidgets.QMainWindow import __init__ [as 别名]
def __init__(self, adb_path=None):
QMainWindow.__init__(self)
Ui_NetworkUI.__init__(self)
self.os = System()
self.setupUi(self)
adb.path = adb_path
self.nm = NetworkManager()