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
Regular Contributor
Posts: 97
Registered: ‎04-19-2012
My Device: BB Torch-9800
My Carrier: *
Accepted Solution

How to remove default cancel button from System Dialog?

Hi All,

 

I wanted to remove default cancel button from System Dialog. After doing some googling got a solution

cancelButton.label: undefined, but while using this line in qml getting error "Invalid Property"

Below is my code.

 

 SystemDialog {
            id: userNameValidation
            title: "Alert!"
            body: "Please enter user name"
           cancelButton.label: undefined
        }

 Eralier it was working but once i updated my QNX IDE after that getiing error on 

cancelButton.label: undefined

Any solution?

Developer
Posts: 217
Registered: ‎09-18-2009
My Device: Z10
My Carrier: O2

Re: How to remove default cancel button from System Dialog?

I had the same issue. The only solution for me was to switch back from SDK 10.1 to SDK 10.0.

 

You could report this in the issue tracker.

Regular Contributor
Posts: 97
Registered: ‎04-19-2012
My Device: BB Torch-9800
My Carrier: *

Re: How to remove default cancel button from System Dialog?

Thanks for reply. will do the same

Developer
Posts: 196
Registered: ‎03-04-2013
My Device: BB Z10
My Carrier: Rogers

Re: How to remove default cancel button from System Dialog?

[ Edited ]

Did you try 0 (zero) ?

cancelButton.label: 0

 It works for me when I do it this way:

SystemDialog *sysTemp = new SystemDialog("Quit", 0, this);

 

--Edit--

Nvm.. doesn't work in QML with 0...