07-04-2012 02:14 AM
How can I use a standard qml component such as a Rectangle in the cascade project? I tried something like this and it doesnt works..
import bb.cascades 1.0
import QtQuick 1.0
Rectangle {
width: 360
height: 360
Text {
text: "Hello World"
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
Nothing is shown in the simulator, and the console says something like...
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
how?
07-04-2012 12:04 PM - edited 07-04-2012 12:07 PM
Welcome to the forums!
As you've probably seen, Cascades is a rich environment, but still under construction. You have cascades UI classes that give you a native look and feel, including a responsive UI that is not guaranteed in Qt applications. To get this, you use cascades UI augmented by native calls and non-UI Qt classes. You can use some Qt UI classes in some cases when they are helper classes not actively involved in the UI. But you either use the cascades UI or the Qt UI, not a mix. This extends to the QML: in cascades you can use the cascades classes or your own components.
(You can write a fully Qt application, if you are willing to give up the deep integration with the OS and the signature Blackberry experience provided through Cascades.)
So: don't use QtQuick. But do use classes documented here:
https://developer.blackberry.com/cascades/referenc
(the documentation applies to both C++ and cascades QML)
What are you trying to achieve? There may be another way to do what you are looking for. I suspect you are looking for a Button, Label, TextArea or TextField. Download the cascadescookbookqml sample and see if there is something there that does what you are looking for.
Stuart
07-04-2012 09:43 PM
I just want to be able to use qt quick components so that it is cross platform, workable on windows,linux,symbian,etc as well..
Other platforms do allow us to use a mix....
I understand about the advantages of having deep integration with blackberry os and native look and feel through cascade.. but cross platform is also what developers look at nowadays..
07-04-2012 09:54 PM
You also mentioned that we can have a fully cascade UI or Qt UI application, not a mix. Then can we have a fully Qt Quick application?
07-05-2012 09:03 AM
As far as I know this works fine but I have never tried it. It is mentioned in a number of threads. Fully Qt applications are supported.
Stuart
07-09-2012 09:14 AM
Not sure if this is related to your question, but see: http://supportforums.blackberry.com/t5/Native-Deve
Stuart
07-09-2012 11:03 PM
thanks for the info..
i have been trying various method and struggling till now..
what i want to do is very simple.. just create a blackberry project that I can use qt quick components in it....
but i still can't get it running on the simulator...
07-17-2012 02:22 PM
Have you succeeded making a Qt Quick application yet?
There are several threads discussing how to make and deliver a Qt application. Check both this forum and the native forum.
Do you still have a specific question not covered by one of the existing threads on Qt applications?
Stuart
07-18-2012 05:35 PM
Check this thread: http://supportforums.blackberry.com/t5/Native-Deve
Should get you started
07-23-2012 03:51 PM
Are you up and running yet?
If one of the posts answered your question, please mark it as a solution.
Otherwise, perhaps you could word your question differently, perhaps with a simple HelloWorld (use the icon with the little clipboard with a C to include the code), and maybe with some lo-res pictures to illustrate what you are seeing.
Stuart