Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

TabControl

A tabbed navigation control. More...

Import Statement: import Felgo 3.0
Inherits:

TabView

Properties

Signals

Detailed Description

This control can be used for a navigation based on tabs. It is based on the Qt Quick TabView and comes with a default TabViewStyle for a platform-specific look.

Children of TabControl should be NavigationItem objects.

To implement a platform dependent navigation, Navigation can be used instead of TabControl.

Note: TabControl uses a lazy-loading mechanism for the contents of each tab. This means, that the tab contents within each NavigationItem element are created when the tab is opened for the first time.

Example Code

To use tabbed control in your application, the following code can be used:

 Page {
   TabControl {
     NavigationItem {
       title: "Tab #1"
       icon: IconType.arrowleft

       FirstPage { }
     }
     NavigationItem {
       title: "Tab #2"
       icon: IconType.arrowright

       SecondPage { }
     }
   }
 }

Property Documentation

[read-only] currentTab : NavigationItem

Accessor for the currently visible NavigationItem.


showIcon : bool

Whether the set NavigationItem::icon should be displayed for the tabs. The default value matches Theme.tabBar.showIcon.

This property was introduced in Felgo 2.7.0.


textFont : font

This property gives full access to all font settings of the title text within the tabs.

This property was introduced in Felgo 2.12.0.


Signal Documentation

tabClicked(NavigationItem = tab, int = index)

Called when a tab has been clicked, and its content page will be displayed.