コード例 #1
0
ファイル: taurusgrid.py プロジェクト: vallsv/taurus
    def attach(self):
        """Attaches the widget to the model"""

        if self.isAttached():
            return True

        # ----------------------------------------------------------------------
        # Write your own code here before attaching widget to attribute connect
        # the proper signal so that the first event is correctly received by the
        # widget

        ret = TaurusBaseWidget.attach(self)

        # by default enable/disable widget according to attach state
        self.setEnabled(ret)
        return ret
コード例 #2
0
    def attach(self):
        """Attaches the widget to the model"""

        if self.isAttached():
            return True

        #----------------------------------------------------------------------
        # Write your own code here before attaching widget to attribute connect
        # the proper signal so that the first event is correctly received by the
        # widget
        #
        # Typical code is:
        # self.connect(self, QtCore.SIGNAL('valueChangedDueToEvent(QString)'),
        #             self.setTextValue)

        ret = TaurusBaseWidget.attach(self)

        # by default enable/disable widget according to attach state
        self.setEnabled(ret)
        return ret