[Development] Window{} API for QML

kenneth.r.christiansen at nokia.com kenneth.r.christiansen at nokia.com
Tue Nov 15 10:30:59 CET 2011



On 15/11/11 10.24, "ext Alan Alpert" <alan.alpert at nokia.com> wrote:

>On Fri, 11 Nov 2011 15:58:56 ext Alan Alpert wrote:
>> On Thu, 10 Nov 2011 18:29:58 Knoll Lars (Nokia-MP-Qt/Oslo) wrote:
>> > On 11/10/11 1:32 AM, "Alan Alpert" <alan.alpert at nokia.com> wrote:
>> > >On Wed, 9 Nov 2011 06:43:34 Knoll Lars (Nokia-MP-Qt/Oslo) wrote:
>> > >> I agree with most of the things in this thread, but not everything.
>> > >>
>> > >>Here's
>> > >>
>> > >> my thoughts:
>> > >> 
>> > >> We need a Window {} element to create surfaces on a physical
>>screen.
>> > >>
>> > >>This
>> > >>
>> > >> Window object should IMO be more or less a direct representation of
>> > >> QQuickView in QML.
>> > >> 
>> > >> So far we all seem to agree.  But I also do not see a need to limit
>> > >> the Window {} API to the mobile use cases. I'd rather that we
>>expose
>> > >> the
>> > >>
>> > >>full
>> > >>
>> > >> functionality in one Object, and rather document some of the
>> > >> differences in behavior between mobile and desktop.
>
>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 string title
>    property int x
>    property int y
>    property int width
>    property int height
>    property bool visible
>    property Orientation requestedOrientation // { Portrait, Landscape, Š
>}
>}

If we get a requested orientation, it would be really nice if it possible
to also get the final sizes (after orientation change). Basically for a
web browser, we want to know that a orientation change is requested. Use
the new sizes to relayout and set up our animation states, then do the
actual orientation change.

Kenneth


>
>This gives us something to start with, since I don't think we're at the
>API 
>freeze for Qt 5 just yet :) . It's also enough for creating new surfaces
>in 
>QML, and ensures we can at least do that.
>
>-- 
>Alan Alpert
>Senior Engineer
>Nokia, Qt Development Frameworks
>_______________________________________________
>Development mailing list
>Development at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list