mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Fix URLs on QT 6 map.
This commit is contained in:
parent
3522feb355
commit
0d333a910e
@ -307,14 +307,12 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
//propagateComposedEvents: true // so links in Text work
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (mouse.button === Qt.LeftButton) {
|
if (mouse.button === Qt.LeftButton) {
|
||||||
selected = !selected
|
selected = !selected
|
||||||
if (selected) {
|
if (selected) {
|
||||||
mapModel.moveToFront(mapModelFiltered.mapRowToSource(index))
|
mapModel.moveToFront(mapModelFiltered.mapRowToSource(index))
|
||||||
}
|
}
|
||||||
//mouse.accepted = false // propagate to text
|
|
||||||
} else if (mouse.button === Qt.RightButton) {
|
} else if (mouse.button === Qt.RightButton) {
|
||||||
menuItems.clear()
|
menuItems.clear()
|
||||||
menus.clear()
|
menus.clear()
|
||||||
|
@ -316,12 +316,6 @@ Item {
|
|||||||
height: text.height + 5
|
height: text.height + 5
|
||||||
radius: 5
|
radius: 5
|
||||||
visible: mapTextVisible
|
visible: mapTextVisible
|
||||||
Text {
|
|
||||||
id: text
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: mapText
|
|
||||||
textFormat: TextEdit.RichText
|
|
||||||
}
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@ -417,6 +411,17 @@ Item {
|
|||||||
object.menu.removeItem(object)
|
object.menu.removeItem(object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Have Text after MouseArea, so links can be clicked
|
||||||
|
Text {
|
||||||
|
id: text
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: mapText
|
||||||
|
textFormat: TextEdit.RichText
|
||||||
|
onLinkActivated: {
|
||||||
|
console.log("Link", link);
|
||||||
|
mapModel.link(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user