From 5e326234a9e8e738d5b126b748e7369991baaa71 Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Mon, 9 Sep 2024 12:24:14 -0700 Subject: [PATCH] object list template --- objectlist.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 objectlist.py diff --git a/objectlist.py b/objectlist.py new file mode 100644 index 0000000..63a179b --- /dev/null +++ b/objectlist.py @@ -0,0 +1,53 @@ +import sys +import time +import threading +from PyQt6.QtWidgets import QApplication, QMainWindow, QHBoxLayout, QVBoxLayout, QWidget, QPushButton, QSlider, QListWidget +from PyQt6.QtMultimedia import QMediaPlayer, QAudioOutput +from PyQt6.QtMultimediaWidgets import QVideoWidget +from PyQt6.QtCore import QUrl, Qt, QEvent + +class VideoPlayer(QMainWindow): + def __init__(self): + super().__init__() + self.fswindow = 0 + self.dclick = False + + self.setWindowTitle("Objects") + self.setGeometry(100, 100, 640, 480) + #self.showFullScreen() + + self.returnbutton = QPushButton("return") + self.returnbutton.setFixedSize(60, 33) + + self.openbutton = QPushButton("open") + self.openbutton.setFixedSize(60, 33) + + self.list_widget = QListWidget(self) + self.list_widget.addItems(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20']) + + layout = QVBoxLayout() + controls = QHBoxLayout() + controls.addWidget(self.returnbutton) + controls.addWidget(self.openbutton) + layout.addLayout(controls) + layout.addWidget(self.list_widget) + #layout.addWidget(self.slider) + + container = QWidget() + container.setLayout(layout) + self.setCentralWidget(container) + #self.set_layout() + + def eventFilter(self, obj, event): + + pass + + return True + + + +if __name__ == "__main__": + app = QApplication(sys.argv) + video_player = VideoPlayer() + video_player.show() + sys.exit(app.exec())