attempting loader logic
This commit is contained in:
@@ -12,14 +12,27 @@ Window {
|
|||||||
signal scanNetworks()
|
signal scanNetworks()
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
id: layout
|
||||||
|
property bool isLoading: false
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: scanbutton
|
id: scanbutton
|
||||||
text: "Scan for networks"
|
text: "Scan for networks"
|
||||||
onClicked: window.scanNetworks()
|
onClicked: {
|
||||||
|
layout.isLoading = true;
|
||||||
|
window.scanNetworks();
|
||||||
|
layout.isLoading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
text: "Loading"
|
||||||
|
visible: layout.isLoading
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listview
|
id: listview
|
||||||
|
visible: !layout.isLoading
|
||||||
model: networksModel
|
model: networksModel
|
||||||
width: 100
|
width: 100
|
||||||
height: 1000
|
height: 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user