import QtQuick 2.0 import QtQuick.Dialogs 1.2 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.4 import "qrc:/js/service.js" as Service import "qrc:/js/helper.js" as Helperjs import "qrc:/js/news.js" as Newsjs import "qrc:/qml/contactqml" import "qrc:/qml/genericqml" Rectangle { y:1 color: "white" TabView{ id:friendsTabView tabPosition: Qt.TopEdge x:mm y:mm width: root.width-2*mm height: root.height-10*mm currentIndex: 0 signal contactsSignal(var username) signal groupsSignal(var username) onCurrentIndexChanged:{ if (currentIndex==0){root.friendsSignal(root.login.username)} else if (currentIndex==1){contactsSignal(root.login.username)} else if (currentIndex==2){groupsSignal(root.login.username)} } style: TabViewStyle { frameOverlap: 1 tab: Rectangle { color: "white" //border.color: "light grey" implicitWidth: root.width/3-2*mm implicitHeight: 4*mm Text { id: text anchors.centerIn: parent text: styleData.title color: "dark grey" font.pixelSize:2.5*mm font.bold: styleData.selected } } frame: Rectangle { color: "light grey" } tabsAlignment:Qt.AlignHCenter } Tab{ title: qsTr("Friends") Rectangle{ id: friendsGridTab function showFriends(username){ try {friendsModel.clear()} catch(e){print(e)}; Helperjs.readData(db,"contacts",username,function(friendsobject){ for (var i=0;i