Browse Source

Added NewsDelegate for the news items; fixed syntax for compatibility with Qt 6.5

qt6
Blagovest Petrov 1 year ago
parent
commit
9cf8c8e3a8
  1. 21
      ui/NewsDelegate.qml

21
ui/NewsDelegate.qml

@ -0,0 +1,21 @@
import QtQuick
import QtQuick.Controls
Text {
height: 25
width: newsList.width
id: titleText
textFormat: Text.RichText
text: "<style>a:link { color: \"#f9be30\"; font-size: 12px; }</style> <a href=\""
+ link + "\">" + title + "</a>"
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
}
}
Loading…
Cancel
Save