QML style guide

Aaron J. Seigo aseigo at kde.org
Wed Nov 7 09:45:31 UTC 2012


On Wednesday, November 7, 2012 11:26:10 Dmitry A. Ashkadov wrote:
> Hello, Aaron!
> 
> 1. If usage of item consist of only one property that is set, then may it be
> placed on one line?
> 
> Example:
> 
> ScriptAction { script: targetItem.smooth = false }
> 
> PlasmaCore.SvgItem {
> ... // blablabla
> svg: PlasmaCore.Svg { imagePath: "path" }
> ... // blablabla
> }

yes, i think this makes sense; it's already fairly common and keeps simple QML 
looking tidy.

> 2. Maybe is it better to fix the aliases like PlasmaCore, PlasmaExtras,
> PlasmaComponents ... for a consistency?

agreed; i'll put a section in Best Practices for these

thanks :)

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121107/6300bdc2/attachment.sig>


More information about the Plasma-devel mailing list