blackberry-10

Accessing QML objects from C++

蹲街弑〆低调 提交于 2019-12-10 18:06:44
问题 Following is a code written to load a QML document to c++. QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this); // Create root object for the UI AbstractPane *root = qml->createRootObject<AbstractPane>(); app->setScene(root); } How do I access the objects of the QMLdocument, such as a button etc; from C++. I need to access them to find the memory address of a specific object in the QML document. 回答1: ImageView* iv= root->findChild<bb::cascades::ImageView*>("myImageView");

Detect user proximity from the screen

邮差的信 提交于 2019-12-10 13:52:38
问题 I'm working on a BB10 app that needs to be able to disable the screen when the user holds the phone up to his/her face during a call. How can I tell when the user is holding the phone up to his/her face? 回答1: To detect the user's proximity from the phone, you can use a QProximitySensor. In order to use this, you need to add these lines to your project's .pro file: CONFIG += mobility MOBILITY += sensors Add the necessary includes to the .cpp and .h files: #include <QtSensors/QProximitySensor>

IBM Worklight 6.0 - “WebWorks SDK source file was not found” error

…衆ロ難τιáo~ 提交于 2019-12-10 12:17:28
问题 I am using Worklight 6 on Mac OS, and I installed WebWorks SDK 2.3.1.5. I have got some issues with WEBWORKS_HOME environment variable, that I fixed after reading IBM Worklight - Mac - "'WEBWORKS_HOME' environment variable is undefined" Now I am having the error WebWorks SDK source file was not found. Make sure to set it in application-decsriptor.xml: Replace it with path to WebWorks SDK When I try to build the Blackberry app. When I check my application descriptor, I only see <blackberry10

Blackberry 10 Installing .bar file [closed]

安稳与你 提交于 2019-12-10 12:08:39
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . I have only .bar file and its debug token . I want to run it on other device of BlackBerry z10. How should I do this? Please help me. 回答1: you need to install debug token to device. Once that is done you can use following command to deploy bar file to device. following command can deploy multiple

IBM Worklight - Windows - “'WEBWORKS_HOME' environment variable is undefined”

我的梦境 提交于 2019-12-10 11:37:50
问题 From the BlackBerry development tutorial I know that first I need to install the BlackBerry 10 WebWorks SDK and then set create a WEBWORKS_HOME environment variable with the SDK path. I do not how to create the environment variable in Eclipse. I set it through Computer-> Properties-> Advanced Settings-> Environment Variables-> User Variables but it did not worked. When I add a BlackBerry 10 environment to my application, it gives the following error in the Eclipse Worklight console: E:

Is there a timer in BlackBerry 10 that runs your functions after a specified time interval?

可紊 提交于 2019-12-10 10:59:58
问题 I searched the internet but there is very little documentation available on BlackBerry 10 development. Is there something in BlackBerry 10 that allows you to run a function forever after specified intervals of time? Like there is NSTimer in iPhone/Objective-C that can run a function after every x minutes or so. 回答1: As pointed by @Sorry_Boss, you can use QTimer on C++ code. If you want to do that in QML, you can also register it for use in QML in the constructor of your app class, like this:

BlackBerry 10 Cascades: How do I load data into a DropDown?

杀马特。学长 韩版系。学妹 提交于 2019-12-09 20:11:03
问题 I have managed to load data from a remote Json web service into a QML ListView, but there doesn't seem to be any such thing for the DropDown control. Does someone have an example or an alternative method to accomplish a DropDown bound to attachedObjects data sources in Cascades? 回答1: I have an alternate method for you, Do note that I have used google's web service here for demonstration purpose, you need to replace it with your url & parse response according to that. import bb.cascades 1.0

The best way to get BlackBerry 10 logs?

蹲街弑〆低调 提交于 2019-12-09 05:32:51
问题 BlackBerry 10 has quite sophisticated logs system compared to iOS and Android. The only solution i found is using javaloader tool like this: javaloader.exe -u eventlog > eventlog.txt But it seems to work only with pre-10 versions of BlackBerry OS. I cannot find this tool in BlackBerry 10 NDK. What is the simplest method to get the logs using the command line? 回答1: There are two ways, both documented in the release notes. If you can copy the logger stream (for an application) to the console by

what is this control and how to use it in BB 10 cascades for navigation

自闭症网瘾萝莉.ら 提交于 2019-12-08 07:38:53
问题 I need to develop a bb 10 cascades app in which i need to add a control like in this image http://subefotos.com/ver/?37868d57047746ce1ea9ca55b7637e9eo.jpg#codigos (rounded in red color) when i touch on second bubble, i need to show second screen ,for third bubble third screen and so on. Default screen should be displayed is first screen(first bubble high lights) but how to do it in BB 10 cascades and what is that control called in bb 10? Please help, Thanks !!! 回答1: -------AM ADDED PAGE

Blackberry 10 Webworks SDK command line generate build with package and signing

邮差的信 提交于 2019-12-08 03:13:09
问题 So I already was able to build the .bar file, but now I want to build the .bar file to be sent to the store with the package and signing. So far I've tried this. bbwp C:\xampp\htdocs\maddash\packaged\maddash.zip -g (password) -b 1.0.0 -o C:\xampp\htdocs\maddash\packaged\ and my error is.. failed to find signing key file 回答1: Did you register your keys from RIM and put them in the default location (%HOMEPATH%\Local Settings\Application Data\Research In Motion for Windows) Did you update your