def METHOD_NAME(self):
    if self.cap != []:
        self.timer_camera.stop()  # 停止计时器
    else:
        # ToDo To AP-kai: QMessageBox.warning没有返回值，这里我把Warming = QMessageBox.warning的Warming删去了
        QMessageBox.warning(self, "Warming", "Push the left upper corner button to Quit.",
                            QMessageBox.Yes)