Forums

OverviewFelgo 2 Support (Qt 5) › SwipeView Crash app with AppMap page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23302

    jrrobles79

    Hello, a couple of weeks ago I asked about this component and the documentation looks very simple to use, but I have encountered a couple of problems:

     

    1. Where is this component added ? I tryed inside a Page but Im having errors with the page configuration, for example  I can’t hide the navigationbar, all these parameter are givin me errors.
    2.  It looks that also have problems with the AppMap component, every time I try to swipe to a Page with that contains the AppMap it get stuck, is there a way no fix this?
    Page {
        id: root
        title: qsTr("iUbo")
    
        //all of these parameters are marked as invalid
        navigationBarTranslucency: 1.0
        backgroundColor: "#1F4291"
        navigationBarHidden: true
        backNavigationEnabled: false
        
        SwipeView {
            id: swipeView
            currentIndex: 1
            anchors.fill: parent
    
            Item {
                id: firstPage
            }
            Item {
                id: secondPage
            }
            Item {
                id: thirdPage
            }
    
            ProfilePage {
                id: profilePage
    
            }
    
    //Can't navigate correctly to this page
            MapTaskPage {
                id: performerMapTaskPage
    
            }
    
    }

     

    =====================. UPDATE ======================

     

    Tryed to add the Swipe on an Item component and that fixes my problem with the page properties, however now I can’t make work the Page that contains the Map, the application crashes and gives errors on the AppMap properties like:

     

    file:iubo/qml/pages/PerformerMapTaskPage.qml:118: QML Connections: Cannot assign to non-existent property “onTaskListFetched”
    file:iubo/qml/pages/PerformerMapTaskPage.qml:43: Unable to assign int to QDeclarativeGeoMapType*

     

    If I open this page outside the SwipeNav, it works just fine and I don’t have those warnings

     

    //SwipeNavigator.qml
    
    Item {
        id: root
        anchors.fill: parent
        SwipeView {
            id: view
    
            currentIndex: 0
            anchors.fill: parent
    
            ProfilePage {
                id: profilePage
            }
    
            //Can't navigate correctly to this page with AppMap
            PerformerMapTaskPage{}
    
        }
    
        PageIndicator {
            id: indicator
            count: view.count
            currentIndex: view.currentIndex
            anchors.bottom: view.bottom
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }
    
    
    //mainpage.qml
    
    Page {
        id: root
        title: qsTr("iUbo Performer")
        navigationBarTranslucency: 1.0
        backgroundColor: "#1F4291"
        navigationBarHidden: true
        backNavigationEnabled: false
    
        SwipeNav{
            id:swipeNav
        }
    
    
    }
    
    
    
    #23328

    Alex
    Felgo Team

    Hi,

    the issue is most likely that you import Qt Quick Controls after the Felgo import. The Controls module also has an item named Page, which causes a namespace conflict and the latter one is used. This is why the properties are marked as invalid, because they do not exist for the Page of the Controls module, only for the Page of the Felgo module.

    You have 2 options:

    • Make sure Felgo 3.0 is the last import, so the Felgp Page component is used.
    • Use a qualified import for the Controls, like
      import QtQuick.Controls 2.14 as QQC2

      and then use e.g. QQC2.SwipeView in your code instead.

    Best,
    Alex

    #23376

    jrrobles79

    Hi Alex, Im still having some issues with this component and I don’t understand whats happening;

    These is are my components: two pages ‘PerformerPage’ and ‘RequesterPage’ both have the same SwipeView code:

    //RequesterPage
    QQC2.SwipeView {
            id: view
            currentIndex: 1
            anchors.fill: parent
    
            Item {
                id: profileItem
                ProfilePage{
                   
                }
            }
    
            Item {
                id: requesterItem
                StartIubo{
                }
            }
        }

     

    //pPerformerPage
        QQC2.SwipeView {
            id: view
            currentIndex: 1
            anchors.fill: parent
    
            Item {
                id: profileItemPage
                ProfilePage{
                }
            }
    
            Item {
                id: mapItemPage
                PerformerMapTaskPage{
                }
            }
        }

     

    To access I have two methods:

    • A directory page that I use only while developing to access the pages directly. when I ‘push’ these pages from here, everything is ok. there is no problem.
     AppButton{
                text: "Open Requester Page"
                width: parent.width
                height: dp(25)
                onClicked: navStack.push( requesterPage )
            }

     

    normal profile page:

    https://www.dropbox.com/s/51a0pl6cn0e1wd7/Screenshot_1588715122.png?dl=0

     

    • SplashPage, RegisterPage or LoginPage. After I check some validations like if the user session if still valid or if I just register or recover my account I check  the user role and redirect to Performer or Requester page, but in this way, mainly the profile page, it appears not only in a bad position but its inner components are also not on the right way.
    // function to redirect depenging on the user role
    
      if (user.role === properties.mRolType.PERFORMER) {
                    navStack.push(  performerPage )
       } else {
                    navStack.push(  requesterPage    )
      }

     

    I don’t know why the profile page are show like this:

    https://www.dropbox.com/s/0vad6y4xw9m5a9a/Screenshot_1588709640.png?dl=0

    I don’t understand why if I push ‘manually’ from one page works fine and looks fine, but programmatically dosen’t work the same.

     

     

     

     

     

     

    #23379

    jrrobles79

    Well I fix my problem translading all the contents on PerformerPage, RequesterPage and ProfilePage into components and add that components on the SwipeView.

     

        QQC2.SwipeView {
            id: swipeView
            currentIndex: 1
            anchors.fill: parent
            background: Image {
                id: backGroundImage
                source: dataModel.getBackground()
            }
    
            Item {
                id: profileItemPage
                ProfileComponent {
                    id: profileComponet
                }
            }
    
    
    
            Item{
                id: performerMapItem
                PerformerComponent{
                    id:performerComponent
                }
            }
        }

     

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

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support