-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.py
39 lines (25 loc) · 904 Bytes
/
sample.py
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
39
from PyQt5 import QtCore
from PyQt5.QtGui import
from PyQt5.QtWidgets import QFrame, QWidget
class Widget(QQWidget):
widgetSignal = QtCore.pyqtSignal()
def __init__(self, parent=None):
QWidget.__init__(self, parent)
def emitWidgetSignal(self):
self.widgetSignal.emit()
class Frame(QFrame):
frameSignal = QtCore.pyqtSignal()
def __init__(self, parent=None):
QFrame.__init__(self, parent)
def emitFrameSignal(self):
self.frameSignal.emit()
class Child(Frame, Widget):
widgetSignal = QtCore.pyqtSignal()
def __init__(self, parent=None):
super(Child, self).__init__(parent)
self.frameSignal.connect(self.printtest)
self.widgetSignal.connect(self.printtest)
self.emitFrameSignal()
self.emitWidgetSignal()
def printtest(self):
print("test")