summaryrefslogtreecommitdiff
path: root/examples/location/places/items/SearchBar.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-12-07 16:28:01 +0100
committerMatthias Rauter <matthias.rauter@qt.io>2023-02-20 11:26:58 +0100
commite770809db4b6c92ee4be22b5ea021ccc505cec8f (patch)
tree110122860d4e06db68ebe06309bcc5167352382f /examples/location/places/items/SearchBar.qml
parent51a895b3d280ce5103785e016e82b77676c26c5f (diff)
downloadqtlocation-e770809db4b6c92ee4be22b5ea021ccc505cec8f.tar.gz
Update location examples to work with MapView/Handlers
MapView replaces Map in the examples to reintroduce event handling. Some of the functionality is still in mapview.map and the code has to be adjusted respectivly. The following examples are affected: mapviewer, places, places_map. The mapviewer example has a new menu to draw mapitems. The places example draws places icons instead of a fixed marker. Fixes: QTBUG-111005 Change-Id: I15ca2b3d3ecb7c35684b9fd4c2b7a86249add11c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/location/places/items/SearchBar.qml')
-rw-r--r--examples/location/places/items/SearchBar.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/location/places/items/SearchBar.qml b/examples/location/places/items/SearchBar.qml
index a06fdba2..706e40cf 100644
--- a/examples/location/places/items/SearchBar.qml
+++ b/examples/location/places/items/SearchBar.qml
@@ -29,10 +29,10 @@ ToolBar {
}
}
+ height: searchBar.height
RowLayout {
id: searchBar
width: parent.width
- height: parent.height
Behavior on opacity { NumberAnimation{} }
visible: opacity ? true : false
TextField {
@@ -42,6 +42,8 @@ ToolBar {
property bool ignoreTextChange: false
placeholderText: qsTr("Type place...")
Layout.fillWidth: true
+ Layout.topMargin: 2
+ Layout.bottomMargin: 2
onTextChanged: {
if (!ignoreTextChange)
searchTextChanged(text)
@@ -52,11 +54,15 @@ ToolBar {
id: searchButton
icon.source: Qt.resolvedUrl("../resources/search.png")
onClicked: doSearch(searchText.text)
+ Layout.topMargin: 2
+ Layout.bottomMargin: 2
}
ToolButton {
id: categoryButton
icon.source: Qt.resolvedUrl("../resources/categories.png")
onClicked: showCategories()
+ Layout.topMargin: 2
+ Layout.bottomMargin: 2
}
}
@@ -82,4 +88,3 @@ ToolBar {
}
}
}
-