Connections QML item
Hello
I try to use the QML 'Connections' element. So far without success.
Attempt 1:
import bb.cascades 1.0
{Page}
content: {container
{Label
text: 'hi. '
}
}
{Of connections
}
}
This gives: "connections is not a type.
Fair enough, I added an import...
Attempt 2:
import Qt 4.7
import bb.cascades 1.0
{Page}
content: {container
{Label
text: 'hi. '
}
}
{Of connections
}
}
This gives: "Impossible to assign the default property does not exist.
Attempt 3:
Moved the connections item in the container.
This gives: "cannot assign the object to the list.
What I am doing wrong?
Thank you
Jamie
It turns out that I got wrong about, and it's only the Visual elements (essentially) which can be mixed with stunts. The connection class is always available, as shown here http://supportforums.blackberry.com/t5/Cascades-Development/QtQuick-Connections-element-C-signals-in...
Tags: BlackBerry Developers
Similar Questions
-
How we can dynamically add or remove action from the popup menu in qml item
Hi all
I want to just dynamically add or remove action from the actionset item in the contextual menu especially in qml.
Thanks in advance.
Kind regards
Ankur
You can do so by joining the actionitem as attachedObjects. Once the page is complete (signal onCreationCompleted), you can add it to the page using addAction()
To remove, you simply delete the page using removeAction()
https://developer.BlackBerry.com/Cascades/reference/bb__cascades__page.html
-
HOWTO simply refer to a QML item and then work with it?
Salvation a simple question:
I have a QML layout and now want to access via c ++ to the Button, TextField oder Label e.g.
I have the following code:
HelloCascadesApp::HelloCascadesApp() { QmlDocument *qml = QmlDocument::create("hellocascades.qml"); qml->setContextProperty("cs", this); AbstractPane *root = qml->createRootNode
(); Application::setScene(root); } is there something like in Android devleopment findViewById?
If it was all the app was going to do, then you wouldn't be even not bother with C++ without doubt, given that it could be done entirely in the QML with Javascript. I'll assume that you already knew and that is just one example of what could be a greater application.
Although it is technically possible to do what you describe, I don't think that's how we're supposed to use QML. You would rather the button to emit a Signal when it has been activated and, after you link to a location in C++ code, you would do the calculations, then probably update a property in the C++ class. Label text would have been bound to the property at startup, then it would update automatically after you change the value of the property.
See the examples and background here http://qt-project.org/doc/qt-4.8/qtbinding.html and here http://qt-project.org/doc/qt-4.8/properties.html .
-
Remove items from the ListView to a ContextAction in QML?
Is it possible to delete a list in qml item triggered by an action of context? I tried to do in signal of onTriggered of the ActionItem of all actions in context, but it seems that I can not even access my ListView by its id.
Inside of a list component should be possible to remove it by
myItemRoot.ListItem.view.dataModel.removeAt( myItemRoot.ListItem.indexPath );
Inside of the OnTriggered could be:
listView.dataModel.removeAt( indexPath );
-
How to access QML object to display the error message.
Hi all
I have a request. I got a login screen ("asset:///qml/screenLogin.qml"). "Connect" OB button I click sendt asks the server sending the XML data as a response.
After that, I am parsing the XML data by using Connection Manager. Code is below:
/* * LoginHandler.cpp * * Created on: Jan 15, 2013 * Author: Ekansh */ /*Parsing the Login Response Structure.
#include "loginhandler.hpp" #include #include #include #include #include ` #include #include namespace bb { namespace cascades { LoginHandler::LoginHandler() { // TODO Auto-generated constructor stub } LoginHandler::~LoginHandler() { // TODO Auto-generated destructor stub } bool LoginHandler::startDocument() { qDebug() << "Start of the document."; return true; } bool LoginHandler::endDocument() { qDebug() << "End of the document."; return true; } bool LoginHandler::startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts) { qDebug() << "Start of element" << qName; for (int i = 0; i < atts.length(); ++i) qDebug() << " " << atts.qName(i) << "=" << atts.value(i); return true; } bool LoginHandler::endElement(const QString &namespaceURI, const QString &localName, const QString &qName) { qDebug() << "End of element" << qName; if (qName == "sessionid") { sessionid = tagValue; qDebug() << "sessionid:: " << sessionid; } else if (qName == "error") { error = tagValue; qDebug() << "error:: " << error; /*QmlDocument *qml = QmlDocument::create("asset:///qml/screenLogin.qml"); //Container *root = qml->createRootObject (); AbstractPane *root = qml->createRootObject (); QObject *newLabel = root->findChild ("errorObject"); if (newLabel) newLabel->setProperty("text", "error");*/ } return true; } bool LoginHandler::fatalError(const QXmlParseException & exception) { qWarning() << QString("Fatal error on line %1, column %2: %3").arg( exception.lineNumber()).arg(exception.columnNumber()).arg( exception.message()); return false; } bool LoginHandler::characters(const QString &str) { qDebug() << "Characters" << str; tagValue = str; return true; } } /* namespace cascades */ } /* namespace bb */ When I put the wrong credentials, I want an error message to display on login QML.
See the code in the EndElement this handler method.
But I am not able set the error message when the connection QML.
Help, please.
You can set the label with the message as below. Condition that you specified label with the same "errorLbl" objectname qml
QObject *lblError = bb::cascades::Application::instance()->findChild
("errorLbl"); if (lblError) lblError->setProperty("text", "error"); -Dishooom
I hope this helps...
-
paintEvent for custom QML elements
Qt, it was easy customized to a QML item re-implement the paintEvent() surroundings and using a QPainter.
Is it possible to Cascade Custom a QML item? For example, create a pie chart item as shown by the above document:
http://Qt-project.org/doc/Qt-4.8/declarative-tutorials-extending-Chapter1-basics.html
Cascades makes its rendering in a separate thread and does not expose an API to render/custom paint.
There are two solutions for this:
- Use the ForeignWindow class, it is possible to incorporate a window in the scene of Cascades. Therefore, you can create your own window and paint your window sort you like - OpenGL or use QPainter on a QImage with the QImage supported by the current window buffer.
- Paint a QImage and use it as a source for a PaintDefinition inside an ImageView
-
Yet another victim of bullying by the issue of the keychain.
Keychain became a relentless bully. We have worked many years in OS X after OS X and, Yes, even with El Capitan. But now the beast hates me and throws me constantly requests for passwords. I tried all of it would have been simple to the most obscure and frightening to fix. I now reluctantly and with the iCloud tried fear. A little less requests for the p - word, but I no longer feeling safe or comfortable to deal with him. I thought that my iMac connection p - word was supposed to open the keychain. It has been used for a long time after that I changed my login. So go to some third party software that also maintains my exposed soldiers, or pretend it didn't happen? What I've done, and what should I do?
OS X - Keychain Access asks for Keychain "login" after the change of password - Apple support
Manage the OS X always ask to use your passwords in keychain
Keychain Access in El Capitan
If you are frequently be invited to re-enter your Keychain password, you will find that fix described for the ERP systems - El Capitan has changed. Follow this procedure:
Copy this text to your Clipboard: com.apple.scopedbookmarksagent.xpc. Open Keychain Access located in your Utilities folder. In the field of research of Keychain Access window, paste the text above.
A window will appear with a password for the connection selected item. Click on the delete key. Click on the button Delete in the Panel to confirm your deletion.
Quit Keychain Access and see if prompts to stop him.
All this I have which may help.
-
How to test the USB on Satellite Pro C870 speed?
Hello
Please I have connect WD item 10 B 8 USB drive to plug 750Go BLUE.
Please how can test if USB3 uses full speed or lower connection USB2 bus?
Brand of disk Crystal 3.03 said 31 MB/s reading and writing! (too low for USB3!)Thank you
Hello
You can use some freeware like tools
-H2testw
-Drive the speed Test 3.2
I used the H2testw to SD card check and test USB memory stick and I was satisfied. -
Hello
I am using the qml item cascade of cursor.
I realized, when the user drag the slider if the signal onValueChanged.
He also issue onValueChanged signal if I set the value manually.
Is it possible to emit a signal onValueChanged does not then change value manually?
Thanks and greetings
Hello! Try
cursor-> blockSignals (true);
.. .modify the value...
cursor-> blockSignals (false);
or unplug and reconnect the signal.
-
Invocation framework icon problem
Hello
I have this problem, I created a group data model to store the possible news of the APP to invoke to share an image.
I fill out the model of data without problem, include the .label, .name and the icon of each target.
But when I try to use the icon with the url provided by the application target and my app then says it cannot be found.
IM receiving this url for foursquare
"/ apps/com.foursquare.blackberry.gYABgBY3zYaCRi7CDRw5ChZRJ18/public/native/icon.png".
This is the error log:
Aug 09 00:17:16.274 com.example.Camculator.testDev__Camculatorfdc2d092.9199832 default 9000 WARNING Image not found: "/ apps/com.foursquare.blackberry.gYABgBY3zYaCRi7CDRw5ChZRJ18/public/native/icon.png".
And it's happening with all the other objectives inoked, bbm, whatsapp etc.
What could be the problem?
Thank you
OK I found it
I tried with my Z10 and the icon were broadcast, but in the dev is not alpha!
So I checked the dev alpha os version is 10.1.0.1483 and the z10 is 10.0.10.690
The previous version of the os when you try to find a file outside of your app directories you must add "file://" to get there. I knew that, but he never saw the double colon I was trying by "file://", my bad
If the code would be like this
QString direc = "file://"+target.icon().toString(); Add the file://
Entry QVariantMap;
entry ['imageSource'] = Director; Insert int the entry for the groupdatamodel informationm_model-> insert (input); Insert the entry int the datamodel
Director will take this Valley foursquare
'file:///apps/com.foursquare.blackberry.gYABgBY3zYaCRi7CDRw5ChZRJ18/public/native/icon.png '.
then read it in my list in qml item
{To ListView
ID: model
dataModel: modellistItemComponents:]
{ListItemComponent}
{StandardListItem}
Title: ListItemData.label
imageSource: ListItemData.imageSource
}}]} ...attachedObjects:]
{GroupDataModel}
ID: model
objectName: "modelo".
}'file:///apps/com.foursquare.blackberry.gYABgBY3zYaCRi7CDRw5ChZRJ18/public/native/icon.png '.
This work!
Thank you
-
How to make the view for Image slideshow as homescreen Blackberry pager
I need help to pager from the view for picture slide show, as the Blackberry homescreen. You know that there is no pager in QML item. I'm looking for an alternative, and I found nothing. Some people give me the idea to do this, but I don't know how to implement, I always need sample code to make it, can someone help me please
Welcome to the forums, good luck with your application.
This has been asked and answered repeatedly last year, answering me repeatedly, according to research being 'slide' or 'Carousel '.
There is a control exactly for this and's called it ListView with a landscape setting.
If you are looking for something a little more complex as the images of scale, etc. so looking to implement your own CustomControl which there are now a few samples on GitHub...
https://github.com/BlackBerry/Cascades-community-samples/tree/master/stumpers/bbjamcarousel
-
Page is not pressed in the Navigation pane.
In the root of my project main qml item is NavigationPane and have three elements of the child Page
hand. QML
import bb.cascades 1.0 NavigationPane { id: navigationPane backButtonsVisible: true Page { id: firstPage Container { background: Color.Gray Label { text: "First page" } } } Page { id: secondPage Container { id: secondContainer background: Color.Gray Label { text: "Second page" } Button { id: myBtn text: "My Button" topMargin: 20 onClicked: { // Here i want to push third page //navigationPane.deprecatedPushQmlByString(childPath) } } } paneProperties: NavigationPaneProperties { backButton: ActionItem { title: "First page" imageSource: "asset:///back.png" onTriggered: { navigationPane.popAndDelete(); } } } } // This is the Third Page Page { id: thirdPage objectName: "myThirdPage" Container { id: thirdContainer background: Color.DarkGray Label { text: "Third Page" } } paneProperties: NavigationPaneProperties { backButton: ActionItem { title: "Second page" imageSource: "asset:///back.png" onTriggered: { navigationPane.popAndDelete(); } } } } onTopChanged: { console.log("Top Is Changing"); } }
On the second page, there is a button (id: myBtn). By clicking on it, I want to push the third page (Page with id: thirdPage).
How to use the method deprecatedPushQmlByString (childPath) to push a element on the page (if its possible that its operating instructions is to inflate a Qml file)Or the path of the page can also be supplied as a parameter, so it then how?
I tried passing the id value and objectName of thirdPage in the method above, but failed (I know that isn't true).
Best approach is to have the subsequent pages in article [] of the attachedObjects and use
navigationPaneId.push (id of the page to push);
and it will work
-
Strange question - width ListItem
While developing applications, I noticed a strange question.
When I draw list in qml item available, it's very nice on an excerpt:
I put
horizontalAlignment: HorizontalAlignment.Fill
and the width of the list item fill all empty space, but when I check the list on Simulator it encapsulates the width of content?
Does anyone know how to set the width of the listItem to fill all the space from left to right?
To sum up,
I want to have (and it looks like this on qml overview):
but I get this (width of list point fits only the content):
Thanks in advance.
Hi, there may be simpler but for me it works using the spaceQuota:
ListItemComponent { type: "item" Container { background: Color.Red Container { preferredHeight: 230 layout: StackLayout { orientation: LayoutOrientation.LeftToRight } Container { layoutProperties: StackLayoutProperties { spaceQuota: 1 } } } } }
-
R12.2.5 login page customize
Dear all,
I'm trying to hide the following attributes in the login page.
Text style: sign up here
Message of choice: accessibility
I am referring to the document, Tips to customize the E-Business Suite R12 Login Page (MainLoginPG) (Doc ID 741459.1()
Used functional administrator and given to False as the value of rendering, but his does not always the options do not appear in the login page.
Kindly give your valuable contributions to go further. If all necessary information, please let me know.
Kind regards
Kirushna
Hello
Sorry for the delay.
I tried to hide the link register here & accessibility.
After changing the value returned as False. Changed the profile values
Profile option: local connection hide items
Value: #RegisterHereURL, #AccessibilityBox
Deleted the cache and tested it was hidden.
Kind regards
Kirushna
-
Why won't the activation of Photoshop Elements
I installed Photoshop elements (and first) and it will not be activated. I have an Adobe ID and I can connect that I entered the serial number Adobe ID but when I try to connect BLAH items I get my passwork and ID then the screen disappears and gets me to elements, but I'm not connected. I uninstalled and reinstalled but still does not.
Working on a PC running Windows 10 and using Firefox for browsing.
Any advice?
Peter
Hi Peter,.
Please see the link and check the files of the host: https://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
Please visit:https://helpx.adobe.com/photoshop-elements/kb/troubleshoot-errors-freezes-install-photosho p.html
I hope this helps.
Concerning
Megha Rawat
Maybe you are looking for
-
Cannot install service packs for windows vista
I realized that my computer has never been able to install the service pack for vista. I bought the computer with vista installed. He was able to install all other updates except for service packs. When I try, I go to windows update and click start i
-
Paper error incompatibility, when printing on tabloid paper.
The printer is a HP Officejet Pro K8600 Series. I am trying to print on tabloid paper (11 x 17) and every time he comes up with a paper mismatch error. It prints very well when the preferences are set to letter-size, but does not work when it is set
-
replacing the hard drive for dell inspiron 1121.
Recently my wd Blue Series hard drive was defective. I'm confused as to if the new which I intend to purchase will adjust the laptop. Can you help me with the same. I am interested in the blue series of WD .would it fits the inspiron purchased 1121 i
-
Hi all Is it possible to use the library GSON on Blackberry? JsonSerializer interface has a Serialize method that takes java.lang.reflect.Type as a parameter that is not supported in Blackberry. Indications will be useful. Kind regards Abhijit chatel
-
Connection USB blackBerry Smartphone problems
I have a BlackBerry Curve 8330 m running the latest OS updates. Recently, my BlackBerry has stopped synchronizing via USB. My computer is a Windows XP with Desktop Manager v.4.7. I never had problems with synchronization previously. Another Member