anchors.fill: parent
ToolButton {
- text: qsTr("←")
+ text: "←"
onClicked: webView.goBack()
enabled: webView.canGoBack
}
ToolButton {
- text: qsTr("→")
+ text: "→"
onClicked: webView.goForward()
enabled: webView.canGoForward
}
TextField {
+ function search() {
+ if (length > 0) {
+ webView.url = "https://www.google.com/search?ie=UTF-8&q=" + text
+ clear()
+ }
+ }
+
id: urlText
Layout.fillWidth: true
selectByMouse: true
- onEditingFinished: {
- webView.url = "https://www.google.com/search?ie=UTF-8&q=" + urlText.text
- clear()
- }
+ placeholderText: "Google"
+ onEditingFinished: search()
+ inputMethodHints: Qt.ImhNoAutoUppercase
}
ToolButton {
id: reload
- text: qsTr("↻")
+ text: "↻"
onClicked: webView.reload()
}
ToolButton {
id: stop
- text: qsTr("×")
+ text: "×"
onClicked: webView.url = "http://localhost/"
}
}
anchors.right: parent.right
anchors.bottom: inputPanel.top
//onUrlChanged: urlText.text = webView.url
+
}
InputPanel {