[SailfishDevel] default SailfishOS Qt Quick Application: view.data() function?

Wim de Vries wsvries at xs4all.nl
Sun May 12 13:39:40 UTC 2013


Answering myself:
I was to focussed on QDeclarativeView.
QScopedPointer has this member that returns " the value of the pointer 
referenced by this object".
sorry.


On 05/12/2013 03:25 PM, Wim de Vries wrote:
> Hi,
> I have taken a "SailfishOS Qt Quick Application" as project.
> I am testing C++<>QML interaction. Works OK until now.
>
> But there is sth. unclear to me:
> in main.cpp:
>
> QScopedPointer<QDeclarativeView> view(Sailfish::createView("main.qml"));
> Sailfish::showView(view.data());
>
> view is a pointer to QDeclarativeView object:
> ...
> void Sailfish::showView(QDeclarativeView* view) {
> ...
> My question is: where is the data() function defined.
> It is not an (inherited) member of QDeclarativeView and is not defined 
> in the project.
> And why ".data()". Should be "->data()".
>
> Still, it works, so I must be overlooking sth.
>
> Thanks.
>
> _______________________________________________
> SailfishOS.org Devel mailing list
>



More information about the Devel mailing list