Hello,Building on my custom main.cpp which I've showed earlier, I've created a sailfishapplication project less project. Which allows you to use the setContext* methods which are useful for QML/C++ communication/integration. I now also have a custom .pro file, which has the sailfishapplication.* stuff removed and has the necessary stuff that was previously in sailfishapplication.pri integrated. My custom main.cpp and .pro are in the tar.gz archive attachment. I hope this is useful for other SailfishDevel list members and saves them some work ;). Of course you will need to edit the "TARGET", "desktop.files" and "OTHER_FILES" sections to match your app's name and edit the "SOURCES" and "HEADERS" sections according to the .cpp's and .hpp's/.h's your project contains.
My project tree now looks like: My_Project |--Headers |--Sources |--QML | |--cover | +--pages |--Other files |--rpm +--My_Project.desktop (Sorry for the bad tree, I'm no ASCII art pro ;) )The whole sailfishapplication project is left out completely as you can see in the tree, no unnecessary stuff left :)
Maybe Jolla can include 2 separate SailfishOS application templates in the beta SDK, one "SailfishOS QML only application" template and a "SailfishOS Qt Quick/C++ application" template (with a special main.cpp that allows the use of setContext* like my main.cpp and custom .pro like mine) :) that would be really handy. Especially because Jolla suggest on sailfishos.org that Sailfish apps are written in a mixture of QML and C++. So IMHO they should have a QML/C++ friendly template ;)
uAlso some links on sailfishos.org to the Qt-project Wiki's pages about QML/C++ communication/integration would be welcome (or additional documentation written by Jolla :) ). As like I said above Jolla suggests that Sailfish apps are written in a QML/C++ mixture, while (almost) all of the documentation or links to documentation on Qt-project.org on sailfishos.org is QML only.
I hope this useful for the other SailfishDevel list members and my feedback is useful for Jolla :) And thanks for all the help I got on this list and for all the awesome work the Jolla guys and women are doing :), keep up the good work! ;),
Superpelican
sailfishapplications-less_custom.tar.gz
Description: GNU Zip compressed data
_______________________________________________ SailfishOS.org Devel mailing list