当前位置: 首页>>代码示例>>Python>>正文


Python QMainWindow.__init__方法代码示例

本文整理汇总了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 {}'],
        } 
开发者ID:srevinsaju,项目名称:guiscrcpy,代码行数:22,代码来源:settings.py

示例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 
开发者ID:FreeOpcUa,项目名称:opcua-modeler,代码行数:6,代码来源:uamodeler.py

示例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) # 随机数 
开发者ID:ouening,项目名称:python-code,代码行数:11,代码来源:youdao_translation.py

示例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() 
开发者ID:ouening,项目名称:python-code,代码行数:8,代码来源:baidu_translation.py

示例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 
开发者ID:FreeOpcUa,项目名称:opcua-client-gui,代码行数:20,代码来源:mainwindow.py

示例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() 
开发者ID:qkitgroup,项目名称:qkit,代码行数:28,代码来源:DatasetsWindow.py

示例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([]) 
开发者ID:veraposeidon,项目名称:Insect_Identification,代码行数:5,代码来源:VideoMainWindow.py

示例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() 
开发者ID:reilleya,项目名称:openMotor,代码行数:40,代码来源:mainWindow.py

示例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 
开发者ID:PaloAltoNetworks,项目名称:pan-fca,代码行数:12,代码来源:load_partial.py

示例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() 
开发者ID:srevinsaju,项目名称:guiscrcpy,代码行数:29,代码来源:toolkit.py

示例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
        ) 
开发者ID:srevinsaju,项目名称:guiscrcpy,代码行数:10,代码来源:initializer.py

示例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() 
开发者ID:srevinsaju,项目名称:guiscrcpy,代码行数:29,代码来源:panel.py

示例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() 
开发者ID:srevinsaju,项目名称:guiscrcpy,代码行数:9,代码来源:network.py


注:本文中的PyQt5.QtWidgets.QMainWindow.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。