MCPcopy Index your code
hub / github.com/PyQt5/PyQt / Label

Class Label

QLabel/QtNinePatch.py:24–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class Label(QLabel):
25
26 def __init__(self, *args, **kwargs):
27 super(Label, self).__init__(*args, **kwargs)
28 # .9 格式的图片
29 self.image = QImage('Data/skin_aio_friend_bubble_pressed.9.png')
30
31 def showEvent(self, event):
32 super(Label, self).showEvent(event)
33 pixmap = QtNinePatch.createPixmapFromNinePatchImage(
34 self.image, self.width(), self.height())
35 self.setPixmap(pixmap)
36
37 def resizeEvent(self, event):
38 super(Label, self).resizeEvent(event)
39 pixmap = QtNinePatch.createPixmapFromNinePatchImage(
40 self.image, self.width(), self.height())
41 self.setPixmap(pixmap)
42
43
44app = QApplication(sys.argv)

Callers 1

QtNinePatch.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected