[Interest] QML StackView fragility (Interest Digest, Vol 39, Issue 14)

Harri Pasanen harri at mpaja.com
Sat Dec 6 13:00:21 CET 2014


Found out more about the StackView issue.
It seems that Loader interacts badly with it, so now I'm not using the 
loader.

         onClicked: helpPage.open(helpContext)
// StackView blows up sometimes if the following loader is used.
//            qmlLoader.source = "qrc:/qml/HelpPage.qml"
//            qmlLoader.item.open(helpContext)

Strangely enough, the commented out code path works about 9 times out of 10.

I may try to distill a test case out of this at some point, but now at 
least this is something to lookout for in case someone else runs into it.

(HelpPage.qml above was the page C below, A->C ran the exact same code, 
so the issue was B, the leaving page somehow got null in the transition.)


On 05/12/2014 23:41, Harri Pasanen wrote:
> StackView blows up for me from time to time for no apparent reason.
> No I seem to have a reproducible issus.
>
>
> I have pages A->B->C
>
>
> From A I do push(B) to got to B, and all is fine.
>
> But when I do push(C) it blows up:
>
>
> file:///home/harri/Qt5.4.0/5.4/gcc_64/qml/QtQuick/Controls/Private/StackViewSlideDelegate.qml:79: 
> TypeError: Cannot read property 'width' of null
>
> file:///home/harri/Qt5.4.0/5.4/gcc_64/qml/QtQuick/Controls/StackView.qml:891: 
> TypeError: Type error
>
> file:///home/harri/Qt5.4.0/5.4/gcc_64/qml/QtQuick/Controls/StackView.qml:902: 
> TypeError: Property 'complete' of object TypeError: Type error is not 
> a function
>
>
> At that point page C is visible, but non-functional due to above errors.
>
>
> But looking at StackViewSlideDelegate.qml I don't see anything 
> obviously wrong there,
>
> the underlying model seems to fail for some reason.
>
>
>
> Any ideas?
>
>
> Harri
>
>
>




More information about the Interest mailing list