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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
ananthasivanvk
Posts: 23
Registered: ‎08-02-2008
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
Please use plain text.
Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Carrier: Verizon

Re: Setting the icon badge of an application in QML

Try setting the badge by

   

Application.setIconBadge(1);

 - Dishooom

Please use plain text.