Sailfish SDK: Requesting well documented C++ and QML tutorial
Hello everyone,
I am trying to do my first steps with the sailfish sdk. I've gone trough the examples and I still can't really figure out how to get c++ and qml connected between each other. I have read and gone through what was posted here https://together.jolla.com/question/272/is-there-proper-c-qml-example/ but as I am newbie (I know c++, but never used Qt or QML so far) it is pretty hard to understand that stuff. Also when you look at http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html#connecting-to-qml-signals, this all seems so simple but in the SDK I don't get that to work.
Until now I've always tried to open a new sailfish project, add an item (with signal to c++) to the firstpage.qml and try to talk with it via C++...basically the chapter "Connecting to QML Signals" from the QT website.
Is there any good developer resource or forum out there? I'll already heard from the sailfish-devel mailing list, which I probably will join soonly. Otherwise please add some good comments to the examples in the SDK or describe them on the Sailfish website. Especially there should be another example besides "signal.pro", showing how to incorporate c++ with qml in SilicaStyle Sailfish UI. I think that this could really make a difference for beginners and therefore encourage more to contribute to this project
Cheers Mika
Hi Mika, you can look at my code. It is neither perfect nor complete, but the code works and is simple enough to understand...
https://github.com/mixalturek/harbour-stator/blob/master/qml/pages/SportPage.qmlhttps://github.com/mixalturek/harbour-stator/tree/master/src
Michal Turek ( 2015-03-04 22:20:47 +0200 )editThx Michal, I'll have a look at it
MikErk ( 2015-03-04 22:32:37 +0200 )editI have had the same problem. Didn't understand how to combine c++, qml and Silica. A really simple example would be helpfull! Will check Michal's code at some point.
pekkeli ( 2015-03-05 09:13:07 +0200 )editForget Silica and focus on Qt. Silica is only a custom SailfishOS library based on Qt. You can always start with general C++/Qt/qml tutorials.
google.com "qml c++" http://qt-project.org/doc/qt-4.8/qml-extending-tutorial-index.html
Michal Turek ( 2015-03-05 09:43:29 +0200 )edit