summaryrefslogtreecommitdiff
path: root/entry.py
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
commit12f840536275ccebe2f382fb1ca40019b16b10f6 (patch)
tree668884dfc808a0a0dd5d28b57498e816cdd830d0 /entry.py
parent8dbf2bfa796f63ca9628ee3395aaa52af247b7ab (diff)
Optional due date; urls working
Diffstat (limited to 'entry.py')
-rw-r--r--entry.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/entry.py b/entry.py
index 261a32c..84af97d 100644
--- a/entry.py
+++ b/entry.py
@@ -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()