Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 23
Registered: ‎08-02-2008
My Device: BlackBerry Dev Alpha
My Carrier: Bharti Airtel

Setting the icon badge of an application in QML

Hi

 

I am not able to set the icon badge of application using QML, I tried the sample code segment given along with the API reference documentation, the following one.

 

import bb.cascades 1.0
 
Page {
    Container {
         
        Button {
            text: "Splat Badge"
            onClicked: {
                Application.setIconBadge(IconBadge.Splat);
            }
        }
 
        Button {
            text: "Remove Badge"
            onClicked: {
                Application.setIconBadge(IconBadge.None);
            }
        }
         
        // Additional QML
    }
}

 

But I could do it successfully using the c++ code segment. Is that anything I am missing to include while using QML ?

 

Regards
Anand
Developer
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810
My Carrier: Verizon

Re: Setting the icon badge of an application in QML

Try setting the badge by

   

Application.setIconBadge(1);

 - Dishooom