← Back to team overview

ubuntu-phone team mailing list archive

Re: multiple screens in qml

 

On Mon, Apr 8, 2013 at 3:31 PM, Николай Шатохин <n.shatokhin@xxxxxxxxx>wrote:

> Yeah! PageStack is a good decision.
>
> But I have two question:
> 1. Line between title and page (default style) is a good design for Ubuntu
> app?
>
I think it looks good in my apps, and it makes a consistent experience
across all applications, but you could follow up on the design list if you
disagree. To answer the question in your next mail, if you set the title
property of the page to an empty string, (title: "") the header will not
show.



> 2. If I have many pages it is not convenient. Can I store each page in own
> qml file?
>
Yes, you can do this quite easily. In fact, if you take a close look at the
sample code in my blog, you will see is exactly how I do it. So you can
create an instance of your component in the code file where you are pushing
and popping on the page stack:

MyCustomComponent
{
    id: custComp
    //all the fancy stuff is in the file MyCustomComponent.qml
}

then just push as expected:
myPageStack.push(custComp)

HTH


>
> Best regards,
> Nick
>
>
> 2013/4/8 Rick Spencer <rick.spencer@xxxxxxxxxxxxx>
>
>> Would PageStack do what you need?
>>
>>
>> http://theravingrick.blogspot.com/2013/04/easy-task-navigation-with-pagestack.html
>>
>> Cheers, Rick
>>
>>
>> On Mon, Apr 8, 2013 at 9:56 AM, Николай Шатохин <n.shatokhin@xxxxxxxxx>wrote:
>>
>>> Hello.
>>>
>>> How can I create multiple screens using QML? I need main menu screen,
>>> game screen, options screen, etc.
>>>
>>> Best regards,
>>> Nick
>>>
>>> --
>>> Mailing list: https://launchpad.net/~ubuntu-phone
>>> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~ubuntu-phone
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>

References