anchors.right: parent.right
RowLayout {
+ 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
+ placeholderText: "Google"
+ onEditingFinished: search()
+ inputMethodHints: Qt.ImhNoAutoUppercase
+ }
+
ToolButton {
- text: qsTr("↻")
+ id: reload
+ text: "↻"
onClicked: webView.reload()
}
- Label {
- id: urlText
+ ToolButton {
+ id: stop
+ text: "×"
+ onClicked: webView.url = "http://localhost/"
}
}
}
WebEngineView {
id: webView
- url: "https://google.cz/"
+ url: "http://localhost/"
anchors.left: parent.left
anchors.top: toolBar.bottom
anchors.right: parent.right
anchors.bottom: inputPanel.top
- onUrlChanged: urlText.text = webView.url
+ //onUrlChanged: urlText.text = webView.url
+
}
InputPanel {