[Development] Window{} API for QML

Alan Alpert alan.alpert at nokia.com
Mon Nov 21 23:15:56 CET 2011


On Mon, 21 Nov 2011 23:49:27 you wrote:
> Mandag 21. november 2011 17.31.30 skrev ext Alan Alpert:
> > On Mon, 21 Nov 2011 17:26:44 ext Alan Alpert wrote:
> > > On Tue, 15 Nov 2011 19:24:50 ext Alan Alpert wrote:
> > > > If we mostly agree, then that's a good starting point. I'll start
> > > > prototyping a Window{} with the following minimal API in a
> > > > QtQuick.Window import (unless someone has a better idea for the
> > > > name, as this import could also contain the exposed Screen stuff
> > > > that is highly related).
> > > > 
> > > > Window{ //Not inheriting QQuickItem, creates a new top level window.
> > > > 
> > > >     property int x
> > > >     property int y
> > > >     property int width
> > > >     property int height
> > > >     property bool visible
> > > >     property Orientation requestedOrientation // { Portrait,
> > > >     Landscape, Š }
> > > > 
> > > > }
> > > 
> > > http://codereview.qt-project.org/#change,9258 in qtdeclarative and
> > 
> > Whoops, that should be http://codereview.qt-project.org/#change,9352 in
> > qtdeclarative.
> 
> Hi Alan,
> I just had a quick look and I'm really looking forward to this kind of qml
> element.
> 
> I'm a bit puzzled though, this api seems a little to limited for desktop
> (no min/max size).
> For mobile on the other hand, why would you need x and y?

You'll need an x/y for any form of positioning, so it seems like an essential 
- if you were just using the one fullscreen window like the average app you 
wouldn't need this element anyways. 

But this is just a starting point for the API. Presumably anything else needed 
for desktop can be exposed from QWindow later. While we need to be more 
careful about adding properties and API to QWindow if it is also exposed to 
QML, we certainly can still add that which is necessary.

-- 
Alan Alpert
Senior Engineer
Nokia, Qt Development Frameworks



More information about the Development mailing list