experiment_widget.py 文件源码

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

项目:pytc-gui 作者: harmslab 项目源码 文件源码
def layout(self):
        """
        Layout the row for this experiment.
        """

        self._main_layout = QW.QGridLayout(self)

        # Construct the header for the experiment
        self._main_layout.addWidget(QW.QLabel(self._expt_label),0,0)

        # -------------- Buttons --------------------

        # Button to show experiment options
        self._show_options_button = QW.QPushButton("", self)
        self._show_options_button.clicked.connect(self._options_callback)
        self._show_options_button.setIcon(QG.QIcon(os.path.join(self._image_base,"icons","more-info.png")))
        self._show_options_button.setIconSize(QC.QSize(21,21))
        self._show_options_button.setFixedWidth(30)
        self._main_layout.addWidget(self._show_options_button,0,1)

        # Button to remove experiment
        self._remove_button = QW.QPushButton("", self)
        self._remove_button.clicked.connect(self._remove_callback)
        self._remove_button.setIcon(QG.QIcon(os.path.join(self._image_base,"icons","delete-icon.png")))
        self._remove_button.setIconSize(QC.QSize(21,21))
        self._remove_button.setFixedWidth(30)
        self._main_layout.addWidget(self._remove_button,0,2)

        self.setFrameShape(QW.QFrame.StyledPanel)

        if self._experiment is None:
            self._show_options_button.setDisabled(True)
            self._remove_button.setDisabled(True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号