]> rtime.felk.cvut.cz Git - coffee/mtbrowser.git/commitdiff
textfield added
authorJiří Matěják <jiri.matejak@fel.cvut.cz>
Fri, 27 Apr 2018 15:40:02 +0000 (17:40 +0200)
committerJiří Matěják <jiri.matejak@fel.cvut.cz>
Fri, 27 Apr 2018 15:40:02 +0000 (17:40 +0200)
main.qml

index 9f5dadc79ea5d3f43eab55c7b274f8e96aabeb52..754b329fa965a8b66828a1e540537d8e4fab26bd 100644 (file)
--- a/main.qml
+++ b/main.qml
@@ -65,6 +65,7 @@ Window {
         anchors.right: parent.right
 
         RowLayout {
+            anchors.fill: parent
 
             ToolButton {
                 text: qsTr("←")
@@ -78,20 +79,23 @@ Window {
                 enabled: webView.canGoForward
             }
 
+            TextField {
+                id: urlText
+                Layout.fillWidth: true
+                selectByMouse: true
+                onEditingFinished: webView.url = urlText.text
+            }
+
             ToolButton {
                 text: qsTr("↻")
                 onClicked: webView.reload()
             }
-
-            Label {
-                id: urlText
-            }
         }
     }
 
     WebEngineView {
         id: webView
-        url: "https://google.cz/"
+        url: "http://localhost/"
         anchors.left: parent.left
         anchors.top: toolBar.bottom
         anchors.right: parent.right