Example #1
0
 def event(self, ev):
     if ev.type() == QEvent.ToolTip:
         if self._showToolTips:
             c = self.charcodeAt(ev.pos())
             if c:
                 text = self.getToolTipText(c)
                 if text:
                     rect = self.charcodeRect(c)
                     QToolTip.showText(ev.globalPos(), text, self, rect)
                     ev.accept()
                     return True
     elif ev.type() == QEvent.QueryWhatsThis:
         if self._showWhatsThis:
             ev.accept()
             return True
     elif ev.type() == QEvent.WhatsThis:
         ev.accept()
         if self._showWhatsThis:
             c = self.charcodeAt(ev.pos())
             text = self.getWhatsThisText(c) if c else None
             if text:
                 QWhatsThis.showText(ev.globalPos(), text, self)
             else:
                 QWhatsThis.leaveWhatsThisMode()
         return True
     return super(CharMap, self).event(ev)
Example #2
0
 def event(self, ev):
     if ev.type() == QEvent.ToolTip:
         if self._showToolTips:
             c = self.charcodeAt(ev.pos())
             if c:
                 text = self.getToolTipText(c)
                 if text:
                     rect = self.charcodeRect(c)
                     QToolTip.showText(ev.globalPos(), text, self, rect)
                     ev.accept()
                     return True
     elif ev.type() == QEvent.QueryWhatsThis:
         if self._showWhatsThis:
             ev.accept()
             return True
     elif ev.type() == QEvent.WhatsThis:
         ev.accept()
         if self._showWhatsThis:
             c = self.charcodeAt(ev.pos())
             text = self.getWhatsThisText(c) if c else None
             if text:
                 QWhatsThis.showText(ev.globalPos(), text, self)
             else:
                 QWhatsThis.leaveWhatsThisMode()
         return True
     return super(CharMap, self).event(ev)
Example #3
0
 def show_help( self ):
     QWhatsThis.showText( QCursor.pos(), self.tableWidget.whatsThis(), self )
Example #4
0
 def show_help(self):
     QWhatsThis.showText(QCursor.pos(), self.tableWidget.whatsThis(), self)