2

I'm creating a QML application for sports bookmaking.

I have a StackView that shows various competitions and markets.

Previously, I used one View to e.g. display various matches in soccer, and then depending on the data I got, I simply changed the model in this view.

I used a StackView to push and pop various views to the user.

I now want to dynamically allocate these views onto the stack:

StackView {
    id: stack

    delegate: StackViewDelegate {
        function transitionFinished(properties) {
            properties.exitItem.opacity = 1
            properties.exitItem.visible = false
        }

        pushTransition: StackViewTransition {
            PropertyAnimation {
                target: enterItem
                property: "opacity"
                from: 0
                to: 1
            }
            PropertyAnimation {
                target: exitItem
                property: "opacity"
                from: 1
                to: 0
            }
        }
    }
}

And a component not yet allocated:

Component {
    id: groupComponent

    GroupView {
        onCompetitionClicked: {
            root.showCompetition(competitionId);
        }
    }
}

Component {
    id: competitionComponent

    CompetitionView {
            // Blabla
    }
}

When clicking in this component, showCompetition pushes a new view onto the stack:

    function showCompetition(competitionId) {

            var view = competitionComponent.createObject();
            view.loadCompetition(competitionId);

            stack.push( {item:view, destroyOnPop:true});
    }

So now this happens (Screenshots)

Before I changed it to dynamic allocation (notice I have hard-coded a title for debugging): enter image description here

After I changed to dynamic allocation (notice the fonts look thicker?): enter image description here

After clicking around a big: enter image description here

Going back to the first page (notice even the hard coded string is obfuscated): enter image description here

Apparently something goes wrong with the strings, as the number data seems to be the same, and the data I receive are still correct, as the breadcrumbs in the top still display the right strings.

What is going on?

John Magistr
  • 872
  • 3
  • 9
  • 22
  • Do you have an Intel graphics card and perhaps not an up-to-date graphics driver? – hmuelner Jun 16 '15 at 12:56
  • @hmuelner I shouldn't think so. I'm running with a GeForce GTX750 using the driver "NVIDIA binary driver - version 346.59 from nvidia-346 (proprietary, tested) according to Ubuntu. – John Magistr Jun 16 '15 at 13:42
  • I seem to have located that the error has something to do with using TTF fonts. – John Magistr Jun 23 '15 at 12:35

0 Answers0