04-23-2013 11:06 AM
Not sure if this the appropraite place, but thought we could post corrections or suggestions to the labs in this forum. I suggest we have one Thread per document. Please suggest somewhere different if this is not a good idea!
Anyway, corrections so far....
3. Add ‘MyApp.hpp’ and ‘MyApp.cpp’ files to the source folder that contains a new App object to server as the applications delegate object.
3. Add ‘MyApp.hpp’ and ‘MyApp.cpp’ files to the source folder that contains a new App object to serve as the application's delegate object.
Same section 3 as above:
a. Right-click the src folder
b. Select New->Header File
c. Set the ‘Header File’ name to MyApp.hpp
d. Right-click the src folder again
e. Select New->Source File
f. Set the ‘Source File’ name to MyApp.cpp
Why not create a new class, and set the class name and base class to QObject. This seems the way you would do this normally.
Just my opinion....
04-23-2013 11:26 AM - edited 04-23-2013 11:36 AM
In this volume of work, it is to be expected I think. So if we can help sort them out, then good.
Continuing, but these ones are really picky......
A) Signals and Slots - main declaration?
9. Open ‘main.cpp’ and replace ....
has the following declaration for main
but the supplied is prefixed with
A bit confusing?
b) Signals and Slots
The 'challenge' is to
"Create a signal that is emitted by the MyApp object when the application is about to quit."
a) As of this point, we have no idea how to do this - or is this covered in the web cast
b) Is it good practice to create a new signal, when there is an already existing one that does the job?
04-23-2013 11:35 AM
QML and C++
a) point 8, the note reads:
Note: Use of 'bb::cascades::' is no longer required when referencing Cascades objects the cpp file include the line using namespace bb::cascades
Note: Use of 'bb::cascades::' is not required when referencing Cascades objects if the cpp file includes the line:
using namespace bb::cascades
BTW, this is a very good Lab in my opinion, it summarizes the easiest ways to connect QML and C++ very well. A question - is there a recommended approach. I was told at one stage that the objectName approach was slow.