X-Git-Url: http://rtime.felk.cvut.cz/gitweb/coffee/mtbrowser.git/blobdiff_plain/9135d2bd6ac32bec8f42e2bc600cdcf80f60c14c..9ad96dc771f88fe4c2b553fe6bcdb490eef7e45c:/main.qml diff --git a/main.qml b/main.qml index bf89577..90e9d69 100644 --- a/main.qml +++ b/main.qml @@ -80,13 +80,17 @@ Window { } 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() - } + onEditingFinished: search() } ToolButton {