コード例 #1
0
 def getToolBars(self):
     if not hasattr(self, '_insertToolBar'):
         self._insertToolBar = QtGui.QToolBar('Insert')
         self._toolBars.append(self._insertToolBar)
         for action in self.insertMenu.actions():
             button = MToolButton()
             button.setDefaultAction(action)
             self._insertToolBar.addWidget(button)
     return self._toolBars
コード例 #2
0
 def getToolBars(self):
     #Add specific tool items with respect to kkit
     if not hasattr(self, '_insertToolBar'):
         self._insertToolBar = QtGui.QToolBar('Insert')
         self._toolBars.append(self._insertToolBar)
         for action in self.insertMenu.actions():
             button = MToolButton()
             button.setDefaultAction(action)
             #set the unicode instead of image by setting
             #button.setText(unicode(u'\u20de'))
             button.setIcon(
                 QtGui.QIcon("~/../../Docs/images/classIcon/" +
                             action.text() + ".png"))
             #button.setIconSize(QtCore.QSize(200,200))
             self._insertToolBar.addWidget(button)
     return self._toolBars