[Qt-qml] Trivial issue I'm sure
Adriano Rezende
adriano.rezende at openbossa.org
Thu Feb 3 21:18:28 CET 2011
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