Add a trivial list of active tasks in the Qt app
This commit is contained in:
parent
13e135491c
commit
2e23d6f058
@ -1,15 +1,21 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import db
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
def 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([])
|
app = QApplication([])
|
||||||
|
|
||||||
window = QWidget()
|
window = QWidget()
|
||||||
layout = QVBoxLayout()
|
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.setLayout(layout)
|
||||||
window.show()
|
window.show()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user