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


Python QObject.__init__方法代码示例

本文整理汇总了Python中PySide2.QtCore.QObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QObject.__init__方法的具体用法?Python QObject.__init__怎么用?Python QObject.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PySide2.QtCore.QObject的用法示例。


在下文中一共展示了QObject.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, obj=None, event_type=None, *args):
     #Creates a new filter object
     QObject.__init__(self, *args)
     self.obj = obj
     self.event_type = event_type
     self.events_handled = 0
     self.events_bypassed = 0
开发者ID:BadSingleton,项目名称:pyside2,代码行数:9,代码来源:qobject_event_filter_test.py

示例2: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
    def __init__(self, widget, eventType, key):
        QObject.__init__(self)

        self.widget = widget
        self.eventType = eventType
        self.key = key

        self.processed = False
开发者ID:BadSingleton,项目名称:pyside2,代码行数:10,代码来源:eventfilter_test.py

示例3: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     # "foobar" will become a object attribute that will not be
     # listed on the among the type attributes. Thus for bug
     # condition be correctly triggered the "foobar" attribute
     # must not previously exist in the parent class.
     self.foobar = None
     # The parent __init__ method must be called after the
     # definition of "self.foobar".
     QObject.__init__(self)
开发者ID:linzhun,项目名称:pyside2,代码行数:11,代码来源:qobject_objectproperty_test.py

示例4: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, *args):
     QObject.__init__(self, *args)
     self.called = False
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:qthread_signal_test.py

示例5: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     QObject.__init__(self)
     self.called = False
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:decoratedslot_test.py

示例6: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, watched):
     QObject.__init__(self)
     self.times_called = 0
     self.watched = watched
开发者ID:BadSingleton,项目名称:pyside2,代码行数:6,代码来源:qtimer_timeout_test.py

示例7: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     QObject.__init__(self)
     self.counter = 0
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:ref05_test.py

示例8: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, number):
     self.myMember = 'myMember' + number
     QObject.__init__(self)
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:bug_428.py

示例9: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     QObject.__init__(self)
开发者ID:e8johan,项目名称:qmlbook,代码行数:4,代码来源:object.py

示例10: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, parent=None):
     QObject.__init__(self, parent)
     self.setObjectName("PySide")
开发者ID:linzhun,项目名称:pyside2,代码行数:5,代码来源:bug_505.py

示例11: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     QObject.__init__(self)
     self.events = []
     self.t = MyThread(self)
     self.t.start()
开发者ID:BadSingleton,项目名称:pyside2,代码行数:7,代码来源:bug_462.py

示例12: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self):
     QObject.__init__(self)
     self.received = None
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:typedef_signal_test.py

示例13: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, parent=None):
     QObject.__init__(self, parent)
     self._slotCalledCount = 0
开发者ID:BadSingleton,项目名称:pyside2,代码行数:5,代码来源:static_metaobject_test.py

示例14: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, text, parent=None):
     QObject.__init__(self, parent)
     self._text = text
开发者ID:donfaco,项目名称:pyside2,代码行数:5,代码来源:qdeclarativeview_test.py

示例15: __init__

# 需要导入模块: from PySide2.QtCore import QObject [as 别名]
# 或者: from PySide2.QtCore.QObject import __init__ [as 别名]
 def __init__(self, parent=None):
     QObject.__init__(self, parent)
     self._mySlotcalled = False
     self._mySlot2called = False
开发者ID:BadSingleton,项目名称:pyside2,代码行数:6,代码来源:bug_820.py


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