diff options
author | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
commit | 12f840536275ccebe2f382fb1ca40019b16b10f6 (patch) | |
tree | 668884dfc808a0a0dd5d28b57498e816cdd830d0 /entry.py | |
parent | 8dbf2bfa796f63ca9628ee3395aaa52af247b7ab (diff) |
Optional due date; urls working
Diffstat (limited to 'entry.py')
-rw-r--r-- | entry.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -19,6 +19,7 @@ class Entry: body = QLabel() body.setTextInteractionFlags(Qt.TextSelectableByMouse) + body.setTextInteractionFlags(Qt.LinksAccessibleByMouse) bullet.setFont(QFont("Arial", 11)) body.setFont(QFont("Arial", 11)) @@ -29,9 +30,14 @@ class Entry: bullet.setText("- ") output.addWidget(bullet) - if(self.due): + if self.due: body.setText("{0}/{1}/{2}: ".format(self.due.month(), self.due.day(), self.due.year())) + if self.link: + body.setOpenExternalLinks(True) + body.setText(body.text() + "<a href=\"{0}\">".format(self.link)) body.setText(body.text() + self.desc) + if self.link: + body.setText(body.text() + "</a>") output.addWidget(body) output.addStretch() |