本文整理汇总了Python中gui.MainWindow.set_video_filename方法的典型用法代码示例。如果您正苦于以下问题:Python MainWindow.set_video_filename方法的具体用法?Python MainWindow.set_video_filename怎么用?Python MainWindow.set_video_filename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.MainWindow
的用法示例。
在下文中一共展示了MainWindow.set_video_filename方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import set_video_filename [as 别名]
def main():
"""
Main function for the program
"""
parser = argparse.ArgumentParser(
description="Loop a video between 2 points in time based on rules in "
"a text file."
)
parser.add_argument('timestamp_filename', metavar='F', nargs='?',
help='the location of the timestamp file')
parser.add_argument('--video_filename', metavar='V',
help='the location of the video file')
args = parser.parse_args()
app = QApplication(sys.argv)
with open("gui/application.qss", "r") as theme_file:
app.setStyleSheet(theme_file.read())
main_window = MainWindow()
if args.timestamp_filename:
timestamp_filename = os.path.abspath(args.timestamp_filename)
main_window.set_timestamp_filename(timestamp_filename)
if args.video_filename:
video_filename = os.path.abspath(args.video_filename)
main_window.set_video_filename(video_filename)
sys.exit(app.exec_())