From 12f840536275ccebe2f382fb1ca40019b16b10f6 Mon Sep 17 00:00:00 2001 From: Louie S Date: Sat, 16 Sep 2023 09:36:14 -0400 Subject: Optional due date; urls working --- entry.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'entry.py') 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() + "".format(self.link)) body.setText(body.text() + self.desc) + if self.link: + body.setText(body.text() + "") output.addWidget(body) output.addStretch() -- cgit