1

I'm actually on Trusty, and I want to try new "head" property which comes with API 14.10 of Ubuntu SDK.

When I launch qmlscene to test my applicaton, I get this error :

Cannot assign to non-existent property "head"

I imported this on my qml file :

import QtQuick 2.2
import Ubuntu.Components 1.1

Thanks for your help.

EDIT : Example of code

import Ubuntu.Components 1.1
import QtQuick 2.2
MainView {
    width: units.gu(50)
    height: units.gu(80)
    useDeprecatedToolbar: false
    Page {
        id: page
        title: "Sections"
        head {
            sections {
                model: ["one", "two", "three"]
            }
        }
        Label {
            anchors.centerIn: parent
            text: "Section " + page.head.sections.selectedIndex
        }
    }
}
4

1 Answer 1

1

This is because you are running an out of date version of the Ubuntu SDK. The Ubuntu SDK is no longer updated on Ubuntu 14.04 (Trusty) even if you have added the SDK PPA. This is because the Ubuntu SDK requires Qt 5.3 which is only available in Ubuntu 14.10.

You can solve this by,

  • Using the Emulator for testing your applications. So you code on Trusty, but run it in the emulator to see if it works as expected. You can find more information on getting started with the emulator here.
  • Upgrading to 14.10 to able to test and run applications on the desktop
  • Use a Utopic VirtualBox VM
3
  • Thanks for your reply Nik. Do you known if there are any plans to provide Ubuntu SDK 14.10 to Ubuntu 14.04 ? I love my tahr =)
    – Debaru
    Aug 25, 2014 at 5:47
  • @Debaru No afaik there are no plans. I love my tahr too :) which is why I use the emulator to run my applications. The i386 emulator is rather fast and takes only 3-4 seconds to launch your application in it through qtcreator.
    – nik90
    Aug 25, 2014 at 15:27
  • @Debaru if this answered your question, can you accept the answer? This question will be then be marked solved.
    – nik90
    Aug 27, 2014 at 23:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .