[Qt-qml] Trivial issue I'm sure
michael.brasser at nokia.com
michael.brasser at nokia.com
Tue Feb 8 06:01:56 CET 2011
Any chance you can share the C++ code for this? (that should make it much easier to identify the culprit)
Thanks,
Michael
On 04/02/2011, at 4:50 AM, ext mathias.malmqvist at nokia.com wrote:
>
> Hi,
>
> I've implemented an as-simple-as-you-can-imagine Margins QML type for the
> Qt Components implementation.
>
> Defining a Margin like this works fine:
> property Margins margins
>
> But when I try to set the margin like this
> margins: { left: 10; right: 10; top: 10; bottom: 10 }
> I get "Unable to assign double to QCpMargins*" errors
> (my class is called QCpMargins just not to clash with Qt's QMargins class)
>
> and when I try reading a value:
> Component.onCompleted: print(margins.left)
> I get "TypeError: Result of expression 'margins' [null] is not an object." errors.
>
> If I misspell "Margin" in the property definition above I get an error, so the type is definitely found.
>
> Comparing my code with other similar code, everything looks in order, so I'm stumped.
> The only difference I can see is that my type does not Q_DECLARE_PRIVATE a
> implementation class, but I don't think that should matter, right?
>
> Any idea what would cause this problem. I'm sure it's something simple...
>
> Thanks!
>
>
> Cheers
> Mathias
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list