I had some code using navigationBar.rightBarItem to add a button on the top-right. But it looks odd on iPhone, and I cannot adjust it.
import Felgo 3.0
import QtQuick 2.5
import QtLocation 5.5
import QtPositioning 5.5
App {
id:app
NavigationStack {
anchors.fill: parent
splitView: false
navigationBar.rightBarItem: AppButton{
text:"GO"
anchors.centerIn: parent
anchors.rightMargin: 10
radius: 5
}
ListPage {
title: qsTr("Map Page")
PositionSource{
id:pos
active: true
onPositionChanged: {
console.log(position.coordinate);
}
}
Map{
id: map
anchors.fill: parent
plugin: Plugin{name:"osm"}
//center: QtPositioning.coordinate(59.930243,10.714635)
center: pos.position.coordinate
zoomLevel: 15
Component.onCompleted: {
console.log(pos.valid); pos.update();
}
}
}
}
}
If you run it, you will see some right part of button go out of the screen on iPhone, while it is ok on Android.
Screenshot here : http://screenshot.net/0expgu9