diff options
Diffstat (limited to 'main.qml')
-rw-r--r-- | main.qml | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -27,18 +27,20 @@ ApplicationWindow { id: channel_tabs objectName: "channel_tabs" TabButton { - text: "a" + objectName: "channel-status" + text: "status" } - function add_channel(channel){ + function add_channel(channel) { var newTab = tabButton.createObject(channel_tabs, {"text": channel}) - channel_tabs.addItem(newTab) - var newChannel = Qt.createComponent("Page1.qml").createObject(swipeView, {"objectName": "channel"+channel}) - + channel_tabs.insertItem(channel_tabs.count, newTab) + var newChannel = Qt.createComponent("IrcChannel.qml").createObject(swipeView, {"objectName": "channel-"+channel}) + channel_tabs.currentIndex = channel_tabs.count-1 + for (var i = 0; i < newChannel.children.length; ++i) { + if (newChannel.children[i].objectName === "input") { + newChannel.children[i].focus = true + } + } } - - - } - } |