Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def createVideoButton(self):
- def toggled(state):
- if state:
- filename, type = QtWidgets.QFileDialog.getSaveFileName(self, "Save Video", str(pathlib.Path.home()), "Video (*.avi)")
- if filename == "":
- b.setChecked(False)
- return
- if not filename.endswith(".avi"):
- filename += ".avi"
- self.startVideo(filename)
- else:
- print(self.__dict__)
- if self.video:
- self.stopVideo()
- b = QtWidgets.QPushButton("Video")
- b.setCheckable(True)
- if self.config[VIDEO] is not None and isinstance(self, TabRealTime):
- b.setChecked(True)
- self.startVideo(self.config[VIDEO])
- b.toggled.connect(toggled)
- return b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement