[SailfishDevel] Pagestack problems
Chris Walker
cdw_nokiaqt at the-walker-household.co.uk
Thu Jul 31 10:56:26 UTC 2014
On Thu, 10 Jul 2014 15:38:52 +0100
Chris Walker <cdw_nokiaqt at the-walker-household.co.uk> wrote:
> On Thu, 10 Jul 2014 16:14:34 +0200 (CEST)
> sfietkonstantin at free.fr wrote:
>
> > Hello, looking a bit at your code, you are using a pagestack.push,
> > meaning that you effectively adds another page to your pagestack.
> >
> > For adding a new beer, I think that the best would be using a Dialog
> > component.
>
> Ok. I'll take a look at how I might do that.
I've finally tried adding a Dialog component but it's not working i.e.
it's not opening a new page but the worst bit is that Creator is not
telling me what's wrong i.e. it isn't reporting any errors.
Here are (what I think) the relevant parts of the code :-
Page {
id: brewerylistpage
.......
PullDownMenu {
MenuItem {
text: qsTr("About");
onClicked: {
pageStack.push(Qt.resolvedUrl("About.qml"))
}
}
MenuItem {
text: "Add Brewery"
onClicked:
Qt.createComponent("AddBreweryPage.qml").createObject(brewerylistpage,
{});
The AddBreweryPage has already been defined and works but leads to page
navigation problems as discussed above.
In an effort to resolve my problem, I've been looking at this page -
http://qt-project.org/forums/viewthread/26455 but it hasn't helped me
fix it.
So where have I gone wrong?
For reference, I haven't uploaded any of this modified code to git.
More information about the Devel
mailing list