コード例 #1
0
ファイル: toolgrid.py プロジェクト: www3838438/orange-canvas
 def paintEvent(self, event):
     p = QStylePainter(self)
     opt = QStyleOptionToolButton()
     self.initStyleOption(opt)
     if self.__text:
         # Replace the text
         opt.text = self.__text
     p.drawComplexControl(QStyle.CC_ToolButton, opt)
     p.end()
コード例 #2
0
 def paintEvent(self, event):
     p = QStylePainter(self)
     opt = QStyleOptionToolButton()
     self.initStyleOption(opt)
     if self.__text:
         # Replace the text
         opt.text = self.__text
     p.drawComplexControl(QStyle.CC_ToolButton, opt)
     p.end()