diff src/gui/widgets/clickable_label.cpp @ 67:442065432549

poster: make posters link to AniList
author Paper <mrpapersonic@gmail.com>
date Mon, 02 Oct 2023 07:06:44 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/widgets/clickable_label.cpp	Mon Oct 02 07:06:44 2023 -0400
@@ -0,0 +1,16 @@
+#include "gui/widgets/clickable_label.h"
+/* NOTE: this can likely be moved to poster.cpp, as
+   it's really the only place this will ever be used */
+
+ClickableLabel::ClickableLabel(QWidget* parent) : QLabel(parent) {
+	setCursor(Qt::PointingHandCursor);
+}
+
+ClickableLabel::~ClickableLabel() {
+}
+
+void ClickableLabel::mousePressEvent(QMouseEvent*) {
+	emit clicked();
+}
+
+#include "gui/widgets/moc_clickable_label.cpp"