fit_param_wrapper.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pytc-gui 作者: harmslab 项目源码 文件源码
def _lower_handler(self):
        """
        Handle lower bound entries.  Turn pink of the value is bad.  
        """

        success = True 
        try:
            value = float(self._lower.text())
            if value > self._p.guess:
                raise ValueError
        except ValueError:
            success = False    

        if success:
            color = "#FFFFFF"
        else:
            color = "#FFB6C1"

        self._lower.setStyleSheet("QLineEdit {{ background-color: {} }}".format(color))

        if success:
            self._p.bounds = [value,self._p.bounds[1]]
            self._current_lower = value
            self._fit.emit_changed()
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号