mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
QML UI: Dynamically change button text
Dynamically change the text of the show/hide profile button. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
This commit is contained in:
parent
3d5ad19888
commit
a734a2ee19
1 changed files with 6 additions and 1 deletions
|
@ -92,9 +92,14 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
text: "Show/Hide Dive Profile"
|
text: "Hide Dive Profile"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
qmlProfile.visible = !qmlProfile.visible
|
qmlProfile.visible = !qmlProfile.visible
|
||||||
|
if (qmlProfile.visible) {
|
||||||
|
text = "Hide Dive Profile"
|
||||||
|
} else {
|
||||||
|
text = "Show Dive Profile"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue