[Interest] [qtquick] Menu & Repeater

Tim Blechmann tim at klingt.org
Mon Jun 23 11:08:24 CEST 2014


hi all,

trying to populated a menu with a model, i figured out that MenuItems
are not instantiated by a Repeater:

code:
--
  Menu {
    id: presetMenu

    MenuItem {
      text: "Menu Begin"
    }

    Repeater {
      model: 4

      MenuItem {
        text: "Index " + index
      }
    }

    MenuItem {
      text: "Menu End"
    }
  }
--

this code gives me a menu with "Menu Begin" and "Menu End", but no menu
entries in between. any idea what i'm doing wrong here?

thnx,
tim




More information about the Interest mailing list