Пример #1
0
 def __init__(self, parent=None):
     super(MacroTabDialog, self).__init__(parent)
     self.setWindowTitle('Qtvcp Macro Menu')
     self._color = QColor(0, 0, 0, 150)
     self._state = False
     self._request_name = 'MACROTAB'
     self.setWindowModality(Qt.ApplicationModal)
     self.setWindowFlags(self.windowFlags() | Qt.Tool | Qt.Dialog
                         | Qt.WindowStaysOnTopHint
                         | Qt.WindowSystemMenuHint)
     self.setMinimumSize(00, 200)
     self.resize(600, 400)
     # patch class to call our button methods rather then the
     # original methods (Gotta do before instantiation)
     MacroTab.closeChecked = self._close
     MacroTab.runChecked = self._run
     MacroTab.setTitle = self._setTitle
     # ok now instantiate patched class
     self.tab = MacroTab()
     self.tab.setObjectName('macroTabInternal_')
     l = QVBoxLayout()
     self.setLayout(l)
     l.addWidget(self.tab)
     #we need the close button
     self.tab.closeButton.setVisible(True)
Пример #2
0
 def createWidget(self, parent):
     return MacroTab(parent)