05-29-2013 12:55 PM
This is not a question. I found a typo in the code:
In the Common Qt classes, in the QDeclarativePropertyMap description, the code goes :
QmlDocument *qml = QmlDocument::create("main.qml");
QDeclarativePropertyMap *p = new QDeclarativePropertyMap();
It should be
QdeclarativePropertyMap *propertyMap = new QDeclarativePropertyMap();
Thanks for this great material!!!!
10-14-2013 07:54 PM
The invokable function switchToTopToBottom (Exercise page 6) shouldn't be under public slots: but instead under public: also it's needed to include QPointer (at least for a Momentics Version: 10.2.1 default project template)
10-15-2013 09:52 AM
You're right. That method doesn't have to be declared as a slot. However, the other method 'swtichBottomToTop' is connected to a signal. They're probably both declared the same way for consistency. There's nothing wrong with declaring the method as a slot, and has the added benefit of allowing users of the class to connect signals to that method.
As for QPointer: I just tried that out with the 10.2 version of the api, and you do not need to explicitly include the QPointer class as long as you're including one of the cascades classes as well (e.g. bb::cascades::Button). If you didn't do that, you'd need to explicitly include the QPointer class as you say. I believe this works the same way in prior versions, since this lab has been around since 10.0, but i haven't checked lately.
10-15-2013 10:18 AM