Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I've followed the currency converter "Hello World" tutorial, as far as I can see exactly how it should. Yet when I try and run it via QMLScene I get a Syntax Error on line 45.

Line 45 is:

XmlListModel {
    id: ratesFetcher
    source: ""
    namespaceDeclarations: "declare namespace gesmes='';"
                       +"declare default element namespace '';"
    query: "/gesmes:Envelope/Cube/Cube/Cube"

    onStatusChanged: {
        if (status === XmlListModel.Ready) {
            for (var i = 0; i < count; i++)
                currencies.append({"currency": get(i).currency, "rate": parseFloat(get(i).rate)})

    XmlRole { name: "currency"; query: "@currency/string()" }
    XmlRole { name: "rate"; query: "@rate/string()" }


Any ideas what I've messed up here? This is the link for complete code.

share|improve this question
Is it this tutorial ?… If yes, it is not an "Hello World!" but a currency converter application. –  air-dex Jan 16 '13 at 17:45

1 Answer 1

up vote 4 down vote accepted

Everything should be inside the Rectangle { } block. See for a working example.

share|improve this answer
Awesome, thank you! –  James Jan 17 '13 at 20:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.