mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Qml app: show contact details when avater clicked
This commit is contained in:
parent
0b82b73131
commit
022c5459d4
1 changed files with 17 additions and 9 deletions
|
@ -21,6 +21,7 @@ import QtQuick.Controls 2.0
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
id: delegateRoot
|
||||||
height: 40
|
height: 40
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
|
@ -43,15 +44,7 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressAndHold:
|
onPressAndHold: showDetails()
|
||||||
{
|
|
||||||
console.log("GxsIntentityDelegate onPressAndHold:", model.name,
|
|
||||||
model.gxs_id)
|
|
||||||
contactsView.searching = false
|
|
||||||
stackView.push(
|
|
||||||
"qrc:/ContactDetails.qml",
|
|
||||||
{md: contactsListView.model.get(index)})
|
|
||||||
}
|
|
||||||
|
|
||||||
ColorHash
|
ColorHash
|
||||||
{
|
{
|
||||||
|
@ -62,6 +55,12 @@ Item
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 2
|
anchors.leftMargin: 2
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: delegateRoot.showDetails()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text
|
Text
|
||||||
|
@ -113,4 +112,13 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showDetails()
|
||||||
|
{
|
||||||
|
console.log("showDetails()", index)
|
||||||
|
contactsView.searching = false
|
||||||
|
stackView.push(
|
||||||
|
"qrc:/ContactDetails.qml",
|
||||||
|
{md: contactsListView.model.get(index)})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue