[Qt-qml] Trivial issue I'm sure

mathias.malmqvist at nokia.com mathias.malmqvist at nokia.com
Thu Feb 3 21:38:35 CET 2011


> You need to remove the colon or place the element name after it.

Well spotted. Unfortunately it didn't help with the main issue. Same result. :(


Cheers
Mathias


________________________________________
From: ext Adriano Rezende [adriano.rezende at openbossa.org]
Sent: Thursday, February 03, 2011 8:18 PM
To: Malmqvist Mathias (Nokia-MS/London)
Cc: qt-qml at qt.nokia.com
Subject: Re: [Qt-qml] Trivial issue I'm sure

On Thu, Feb 3, 2011 at 3:50 PM,  <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)

You need to remove the colon or place the element name after it.

margins: Margins { left: 10; right: 10; }

or

margins { left: 10; right: 10; } // in this case the property must no be null

Br,
Adriano


More information about the Qt-qml mailing list