]> rtime.felk.cvut.cz Git - coffee/mtbrowser.git/commitdiff
url field
authorJiří Matěják <jiri.matejak@fel.cvut.cz>
Mon, 21 May 2018 15:38:09 +0000 (17:38 +0200)
committerJiří Matěják <jiri.matejak@fel.cvut.cz>
Mon, 21 May 2018 15:38:09 +0000 (17:38 +0200)
main.qml

index b5068426d5d90f1774c70ba7414d2d870a4d32d5..7c85ba5db4965b1f2ac9185f78d95eee55c2ea90 100644 (file)
--- 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"