[SailfishDevel] What's the correct way to do this?

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Sat Jun 6 06:11:55 UTC 2015


https://github.com/tonercloud/fuelpad/blob/master/harbour-fuelpad/qml/pages/FuelpadPage.qml#L88

pass carmodel.get(index)  to the function? (or carListview.model.get(index) ) instead of "model"


-kimmo



________________________________
Lähettäjä: devel-bounces at lists.sailfishos.org [devel-bounces at lists.sailfishos.org] käyttäjän Amilcar Santos [amilcar.santos at gmail.com] puolesta
Lähetetty: 5. kesäkuuta 2015 20:58
Vastaanottaja: Sailfish OS Developers
Aihe: Re: [SailfishDevel] What's the correct way to do this?

It may be a name collision between carDetails.model (from the database) and ListView.model (Qml delegate implemention)..
Try renaming the 'model' colunm in the 'car' table

Bg,
Amilcar

2015-06-05 18:35 GMT+01:00 Krisztian Olah <fasza2mobile at gmail.com<mailto:fasza2mobile at gmail.com>>:
You are passing a carmodel as an argument to carpassDetails, chances are you did not define member named id or register in carmodel, but probably that's not want to do anyway. You seem to expect carDetails to be some different type, I did not find any definition to its type other than it being a QVariant in careRecordsPage.qml.

The way you want to pass carDetails is correct, but you are passing the model.

On Fri Jun 5 17:57:52 2015 GMT+0100, Chris Walker wrote:
> On Fri, 5 Jun 2015 16:53:22 +0000
> Krisztian Olah <fasza2mobile at gmail.com<mailto:fasza2mobile at gmail.com>> wrote:
>
> > It looks like the object carDetails does not exist in the scope
> > you're trying to access it. What scope is your carDetails object in?
> > If you could briefly describe in which file each relevant
> > function/object  reside, would be helpful.
>
> I've just pushed the code to github. So would that be better than me
> trying to explain it?
>
> It's here :-
> https://github.com/tonercloud/fuelpad
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org<mailto:devel-unsubscribe at lists.sailfishos.org>
>
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org<mailto:devel-unsubscribe at lists.sailfishos.org>



--
Amilcar
(djditz in the mix... ;)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150606/c3ed1ed6/attachment-0001.html>


More information about the Devel mailing list