Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › Implementation of Twitter App is not working!

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18688

    Niyazi

    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"
        }
    
    }
    
    
    
    

     

     

    #18690

    Niyazi

    I am also try to run live demo on https://felgo.com/doc/vplayapps-navigation/.

    And I am getting error as well

     

    Error shows on https://felgo.com/web-editor/
    <div>Felgo Live Code Reloading: Web Editor</div>
    <div>Android SM-G935F
    QQmlComponent: Component is not ready
    file:WebEditor/qml/WebScriptMain.qml:13: WidgetsPage is not a type</div>

    #18692

    Niyazi
    // -----------------------------
    // (1) Working Navigation Layout
    // -----------------------------
    Resources.qrc
    	/
    		qml
    			TestMain.qml
    			TestMainPage.qml
    			FirstPage.qml
    			SecondPage.qml
    			
    
    // ---------------------------------			
    // (2) Not Working Navigation Layout
    // ---------------------------------	
    Resources.qrc
    	/
    		qml // Folder
    			TestMain.qml		// Qml File
    			TestMainPage.qml	// Qml File
    			
    			pages // Folder
    				FirstPage.qml	// Qml File
    				SecondPage.qml	// Qml File
    
    	

    My question is that, what should I do to make (2) working?

    #18801

    Günther
    Felgo Team

    Hi,

    sorry about the live demo on https://felgo.com/doc/vplayapps-navigation/, we fixed it already.
    It referred to a custom WidgetsPage component, which was not part of the example.

     

    Can you make sure that all your QML files lie in the correct folders in your file system?

    Eg.. <project-path>/qml/pages/FirstPage.qml, etc…

     

    Best,
    Günther

    #18805

    Niyazi

    Thanks Gunther I will try.

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded