Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using the Ubuntu SDK, how can I get an anchor to the top of the toolbar?

I want something like this:

MyItem {

so that I can anchor an item to an omnipresent toolbar in a way that is suitable for a pointer-driven interface.

share|improve this question
up vote 1 down vote accepted

When the toolbar is locked and opened, the contents of the MainView are automatically anchored to the top of the toolbar. However, there is a bug in the SDK which causes a 2gu margin above the toolbar. I fix it by adding the following to MainView:

states: [
    State {
        when: showToolbar

        PropertyChanges {
            target: taskViewPage.parent
            anchors.bottomMargin: -root.toolbar.triggerSize
share|improve this answer

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.