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

Forums

OverviewFelgo 3 Support (Qt 5) › Adding badge notification into a NavigationItem….

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13825

    Francois

    Hello,

    I would like to add a badge notification ( red circle with a number inside ) into a NavigationItem.

    Is there a way to do that ?

    Thanks for your help.

     

    Best Regards.

     

    F.

    #13848

    Günther
    Felgo Team

    Hi Francois!

    You can customize the NavigationBarItems any way you want. Either create your own NavigationBarItem or just extend an existing one like the IconButtonBarItem.

    This is how you could add a badge to an IconButtonBarItem:

    IconButtonBarItem {
            icon: IconType.globe
            onClicked: { /* DO SOTHEMING */ }
    
            // add badge
            Rectangle {
              x: parent.width * 0.8 - width
              y: parent.height * 0.25
              width: dp(14)
              height: width
              color: "red"
              radius: width * 0.5
    
              AppText {
                text: "3"
                font.pixelSize: sp(9)
                font.bold: true
                anchors.centerIn: parent
                color: "white"
              }
            }
          }

     

    Cheers,
    Günther

    #13849

    Francois

    Hello Günther,

    You rocks !!!

    Many Thanks for your help.

    Best Regards.

     

    F.

     

Viewing 3 posts - 1 through 3 (of 3 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