diff --git a/src/edible_elephant/qt.py b/src/edible_elephant/qt.py index 7912eaa..5ee6628 100755 --- a/src/edible_elephant/qt.py +++ b/src/edible_elephant/qt.py @@ -1,15 +1,21 @@ #!/usr/bin/env python3 +import db + if __name__ == '__main__': def main(): - from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout + from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QLabel + + session = db.load_db() app = QApplication([]) window = QWidget() layout = QVBoxLayout() - layout.addWidget(QPushButton('Top')) - layout.addWidget(QPushButton('Bottom')) + + for task in session.query(db.Task).filter(db.Task.active == True): + layout.addWidget(QLabel(task.title)) + window.setLayout(layout) window.show()