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

Forums

OverviewFelgo 2 Support (Qt 5) › TabControl problem

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

    Davide Manuel

    Hi there.

     

    I’m developping an app for android and i’m using tabcontrol as navigation.

    My problem is that i can’t set the tab text size and i’m getting an ugly tabbar, as seeing in the pic:

     

    My code is simple as :

    TabControl {
            id: navigation
            showIcon: true
            tabPosition: Qt.BottomEdge
            NavigationItem {
                id: ddd
                icon: IconType.shoppingcart
                title: "page1"
                NavigationStack {
                    PageOne{
                    }
                }
            }
            NavigationItem {
                icon: IconType.history
                title: "page2"
                NavigationStack {
                    PageTwo{
                    }
                }
            }
            NavigationItem {
                icon: IconType.user
                title: "Page3"
                NavigationStack {
                    PageThree{
    
                    }
                }
            }
        }

     

    And i’m getting this:

     

    I’ve tried to use textFont property on tabcontrol, but can’t figure out how to use it.

     

    Thx for any help.

     

    #17430

    Davide Manuel

    Editing: i tried to use Theme to set the global tab text size, but no success.

    onInitTheme: {
      Theme.tabBar.textSize = sp(8) 
    }

     

    #17432

    Günther
    Felgo Team

    Hi!

    I don’t see your screenshot anywhere, but the following code snippet works for me (note that the Theme.tabBar.textSize property does not require using sp):

    App {
      
      onInitTheme: {
        Theme.tabBar.textSize = 8
      }
      
      TabControl {
        id: navigation
        showIcon: true
        tabPosition: Qt.BottomEdge
        NavigationItem {
          id: ddd
          icon: IconType.shoppingcart
          title: "page1"
          NavigationStack {
            Page{
              title: "Page 1"
            }
          }
        }
        NavigationItem {
          icon: IconType.history
          title: "page2"
          NavigationStack {
            Page {
              title: "Page 2"
            }
          }
        }
        NavigationItem {
          icon: IconType.user
          title: "Page3"
          NavigationStack {
            Page {
              title: "Page 3"
            }
          }
        }
      }
    }

     

    Best,
    Günther

    #17436

    Davide Manuel

    Hi Gunther.

    Strange, i’m seeing the pic on my post.

    I just pasted it. There’s another way to send pics here?

     

    By the way, your right. Just removed the sp and now is fine.

     

    Thx

     

    P.S: how may i set the topic closed?

     

    #17439

    Günther
    Felgo Team

    Hi,

    You can consider the topic closed if all questions are answered 😉

    The forum does not support posting images directly at the moment. It is possible to use external services for uploading/sharing an image via url.
    Best,
    Günther

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