summaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml44
1 files changed, 44 insertions, 0 deletions
diff --git a/main.qml b/main.qml
new file mode 100644
index 0000000..e1052fd
--- /dev/null
+++ b/main.qml
@@ -0,0 +1,44 @@
+import QtQuick 2.7
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.3
+
+ApplicationWindow {
+ visible: true
+ width: 640
+ height: 530
+ title: qsTr("blachat")
+
+
+ StackLayout {
+ id: swipeView
+ anchors.fill: parent
+ currentIndex: channel_tabs.currentIndex
+
+ IrcChannel {
+ }
+
+ }
+ Component {
+ id: tabButton
+ TabButton { text: "TabButton" }
+ }
+
+ footer: TabBar {
+ id: channel_tabs
+ objectName: "channel_tabs"
+ TabButton {
+ text: "a"
+ }
+
+ 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})
+
+ }
+
+
+
+ }
+
+}