Hi,
I try to study the Twitter app. And I try to implement Twitter app layout. But live view shows nothing. Any help please?
//——————————————————————
//TestMain.qml
//——————————————————————
import Felgo 3.0
import QtQuick 2.10
import QtQuick.Controls 2.2
import "."
App {
//licenseKey: "<generate one from https://felgo.com/licenseKey>"
id: app
onInitTheme: {
Theme.platform = "ios"
settings.language = "tr_TR"
uiScale: 1 // (1) for Mobiles and (2) for Desktops
Theme.colors.statusBarStyle = Theme.colors.statusBarStyleHidden
Theme.navigationBar.backgroundColor = "lightblue"
Theme.navigationBar.titleColor = "red"
Theme.navigationBar.itemColor = "black"
}
TestMainPage { }
}
//——————————————————————
//TestMainPage.qml
//——————————————————————
import Felgo 3.0
import QtQuick 2.10
import QtQuick.Controls 2.2
import "pages"
import "widgets"
Page {
id: TestMainPage
anchors.bottom: parent.bottom
// These can be used from anywhere in the app
// This way the QML files are parsed only once
Component {id: mainPageComponent; MainPage { } }
Component {id: storePageComponent; StorePage { } }
// Making page navigation public. This allow tracking navigation changes
property alias navigation: navigation
Navigation {
id: navigation
drawer.drawerPosition: drawer.drawerPositionLeft
headerView: NavHeader {}
footerView: NavFooter {}
NavigationItem {
title: "Home"
icon: IconType.home
NavigationStack {
MainPage { }
}
}
NavigationItem {
title: "Store"
icon: IconType.bars
NavigationStack {
StorePage { }
}
}
}
}
//——————————————————————
// Widgets Folder
//——————————————————————
// NavFooter.qml
//——————————————————————
import QtQuick 2.10
import Felgo 3.0
AppText {
width: parent.width
height: dp(48)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "www.Test.com.tr"
color: "lightblue"
font.pixelSize: sp(16)
MouseArea {
id: mouse
anchors.fill: parent
onClicked: Qt.openUrlExternally("www.Test.com.tr")
cursorShape: Qt.PointingHandCursor
}
}
//——————————————————————
// Widgets Folder
//——————————————————————
// NavHeader.qml
//——————————————————————
import QtQuick 2.10
import Felgo 3.0
Item {
width: parent.width
height: dp(60)
AppText {
width: parent.width
text: "Test"
horizontalAlignment: Text.Center
color: "lightblue"
font.pixelSize: sp(12)
}
}
//——————————————————————
// Pages Folder
// ——————————————————————
// MainPage.qml
//——————————————————————
import Felgo 3.0
import QtQuick 2.10
import QtQuick.Controls 2.2
Item {
// Delete later
Text {
anchors.fill: parent
text: "Main Page"
color: "black"
}
}
//——————————————————————
// Pages Folder
//——————————————————————
// StorePage.qml
// ——————————————————————
import Felgo 3.0
import QtQuick 2.10
import QtQuick.Controls 2.2
Item {
// Delete later
Text {
anchors.fill: parent
text: "Store Page"
color: "black"
}
}