Developing multi page app like Viber interface using Qt Quick?

756 views Asked by At

I want to develop a Android app with an interface like Viber. Multi pages that user can swipe between them.

How can I do this with Qt and Qt Quick?

Is StackView what I need?

1

There are 1 answers

0
Andrew On

I haven't used Viber on Android but on iOS (and the last time i used it over a year ago) they had a UITabBarController at the bottom which switch between several main screens. The contact screen for example displayed a UITableView wrapped in a UINavigationController so you could select a contact then view the contact's details.

So what you could do is this:

  • Build a TabBar QML Component and anchor it to the bottom.
  • Build a Tab Component that's reusable so you can just add new tabs to the TabBar with a method like addTab(Component, string) where Component is your customized reusable Tab component and string is the name of your view's QML file which can be lazy loaded with a Loader.
  • In your Contacts QML file (or any one that needs a "Master-Detail View") you can then create a StackView and add any required view's as components.

Take a read though this: http://doc.qt.io/qt-5/qml-qtquick-controls-stackview.html

Definitely also read up on how QML Loader and QML Component work as they'll be the basis for most of this. You might want to experiment with this first in a separate project before getting too deep in the real UI.