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

New Developer
Posts: 101
Registered: ‎11-08-2012
My Device: 9790
My Carrier: Reliance

Random Number Generation

How can i generate and use random number in my qml file on button click , Is their exist some fuction . If yes plase let me know , or suggest me the way to do it .


Random Number generation and use in qml file on button clicked


Thanks ,

Posts: 14
Registered: ‎10-24-2012
My Device: BlackBerry Z10 Limited Edition
My Carrier: Globe Telecoms

Re: Random Number Generation

QML is for the U.I.. You can use C++ (Or J.S) for the logic part. Here's how you can generate random numbers in C++: http://www.daniweb.com/software-development/cpp/threads/1769/c-random-numbers Here's how you can generate random numbers in JavaScript: http://www.javascriptkit.com/javatutors/randomnum.shtml Hope that helps! Smiley Happy
Core Member, PinoyBBDev