From dc50b8764ae227691bf891fce73439f1ef7eded5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Mat=C4=9Bj=C3=A1k?= Date: Mon, 21 May 2018 17:38:09 +0200 Subject: [PATCH] url field --- main.qml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/main.qml b/main.qml index b506842..7c85ba5 100644 --- a/main.qml +++ b/main.qml @@ -79,6 +79,23 @@ Window { enabled: webView.canGoForward } + + TextField { + function go_to() { + if (length > 0) { + webView.url = text + clear() + } + } + + id: urlText + Layout.fillWidth: true + selectByMouse: true + placeholderText: "URL" + onEditingFinished: go_to() + inputMethodHints: Qt.ImhNoAutoUppercase + } + TextField { function search() { if (length > 0) { @@ -87,7 +104,7 @@ Window { } } - id: urlText + id: searchText Layout.fillWidth: true selectByMouse: true placeholderText: "Google" -- 2.39.2