From 9cf8c8e3a829c1a0ceca2dabad31d236557fb00c Mon Sep 17 00:00:00 2001 From: Blagovest Petrov Date: Sat, 6 May 2023 00:53:09 +0300 Subject: [PATCH] Added NewsDelegate for the news items; fixed syntax for compatibility with Qt 6.5 --- ui/NewsDelegate.qml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ui/NewsDelegate.qml diff --git a/ui/NewsDelegate.qml b/ui/NewsDelegate.qml new file mode 100644 index 0000000..86d4232 --- /dev/null +++ b/ui/NewsDelegate.qml @@ -0,0 +1,21 @@ +import QtQuick +import QtQuick.Controls + +Text { + height: 25 + width: newsList.width + id: titleText + textFormat: Text.RichText + text: " " + title + "" + wrapMode: Text.WordWrap + font.pixelSize: 12 + font.bold: true + onLinkActivated: openLink => Qt.openUrlExternally(link) + MouseArea { + id: mouseArea + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + acceptedButtons: Qt.NoButton + } +}