當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。