summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-09-16 09:36:14 -0400
committerLouie S <louie@example.com>2023-09-16 09:36:14 -0400
commit0f71101423a793fcdb78d500da6070c2a49374cf (patch)
treef373d419c63751551d63b7d14e750441f0b5a00b
parentf4695b37ed6280782d4d088fdf7a939dfb199756 (diff)
Scrolling implemented
-rwxr-xr-xassignment-list.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/assignment-list.py b/assignment-list.py
index 9591155..6953695 100755
--- a/assignment-list.py
+++ b/assignment-list.py
@@ -1,7 +1,7 @@
#!/usr/bin/python3
import sys
import time
-from PyQt5.QtWidgets import QAction, QApplication, QHBoxLayout, QLabel, QMainWindow, QMessageBox, QPushButton, QToolBar, QVBoxLayout, QWidget
+from PyQt5.QtWidgets import QAction, QApplication, QHBoxLayout, QLabel, QMainWindow, QMessageBox, QPushButton, QScrollArea, QToolBar, QVBoxLayout, QWidget
from PyQt5.QtGui import QFont
from PyQt5.QtCore import QDate, QDateTime, Qt
from add_group_form import addGroupForm
@@ -74,8 +74,10 @@ class AssignmentList(QMainWindow):
DB.initDB()
def displayWidgets(self):
- main_widget = QWidget(self)
- self.setCentralWidget(main_widget)
+ main_widget_scroll_area = QScrollArea(self)
+ main_widget_scroll_area.setWidgetResizable(True)
+ main_widget = QWidget()
+ self.setCentralWidget(main_widget_scroll_area)
title = QLabel(time.strftime("%A, %b %d %Y"))
title.setFont(QFont("Arial", 17))
@@ -96,6 +98,7 @@ class AssignmentList(QMainWindow):
v_box.addStretch()
main_widget.setLayout(v_box)
+ main_widget_scroll_area.setWidget(main_widget)
def addGroup(self):
"""