[Interest] Structuring of QML app as set of interlinked screens for maximum code reuse

Elvis Stansvik elvstone at gmail.com
Tue Mar 29 09:17:45 CEST 2016


Hi Nikita,

(just back from Easter holiday)

2016-03-25 10:32 GMT+01:00 Nikita Krupenko <krnekit at gmail.com>:
> 2016-03-22 21:13 GMT+02:00 Elvis Stansvik <elvstone at gmail.com>:
>> But this will only allow me to redefine properties, and add new child
>> items. How would I then be able to define both which content goes in
>> the main area (the content Rectangle in the "base" item) and in the
>> two navigation bars (topBar and bottomBar Rectangles)?
>>
>> It seems QML is not really meant to be used this way, and I'd have to
>> essentially redefine these things in each of my screens, even if
>> they'll all have the same general structure? There's no "template"
>> mechanism so to speak?
>
> You can use Page from Qt Quick Controls 2:
> http://doc-snapshots.qt.io/qt5-5.6/qml-qt-labs-controls-page.html
> It has header and foote properties and can be used as a skeleton of
> your pages and you can place this pages into StackView then.
> Note however, that Qt Quick Controls 1 and 2 is a different modules.

That looks excellent, I'll look into that.

Thanks,
Elvis


> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list