QML style guide

Aaron J. Seigo aseigo at kde.org
Mon Oct 29 21:31:20 UTC 2012


On Monday, October 29, 2012 21:52:38 Ivan Čukić wrote:
> > property declarations
> > signal declarations
> > JavaScript functions
> > object properties
> > child objects
> > states
> > transitions

other than object properties following functions, this looks nice. the example 
on that wiki page does not have signals, states or transitions which do indeed 
all need to be added.

i don't like objects properties following functions for 2 "imho" reasons:

* it's nicer to see an overview of all properties at once
* otherwise you get JS functions which are typically blocks of code, then 
properties which are usually one-liners, then child objects which are blocks 
of code again. this back-and-forth of styles is visually messy.

i do like states and transitions at the end as they define how the things above 
work together.

-- 
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/20121029/8de89a79/attachment.sig>


More information about the Plasma-devel mailing list