Questions » Recent Q&A » Momentics QML designer disabled

Momentics QML designer disabled

Posted 18 days ago
  • Try setting the perspective to QML editing. On mac this is in (Window->Open Perspective->QML Editing).

    After that, show the components pane. (Window->Show View->Components)

  • That didn't work. The designer buttons are still disabled.

  • The objects won't have an effect when you drag them onto the qml file unless you drag them into a correct block. e.g. Momentics will not allow you to drag a "Page" into a "Page." (the truly disabled items have all grey text. you can scroll down the list to see those saying "missing import")

    There is an issue with adding the first control onto an empty qml file (one with just the "import bb.cascades 1.4" line). You need to drag the first control "above" the import line. Subsequent controls can be inserted normally.

    To see what is allowed inside a control, place the cursor inside its block and show the "QML Properties" view.

    The allowed top-level "Panes" are Navigation Pane, Tabbed Pane and Page. You can also have a top-level Container which helps to spread code across qml files. Your app must have one top level Page to be visible. This Page might be the topmost "Pane" or it might be one of many under your app's Navigation or Tabbed Pane.

    Most controls will be inserted into a Page or Containers within a Page. Each qml file will usually have A Page or Container with many Controls inside them.

    If your app's top level "Pane" is a Navigation Pane, then you will probably have many QML files with Pages at the top level. Conversely, if your app's top level Pane is a Page, then your QML files will have Containers at the top level.

    Momentics treats each qml file as a control according to its CamelCase file name so MyButton.qml in your assets folder can be inserted into a Page/Container as MyButton{}. Therefore the top-level control within a qml file must be allowed inside the block you insert it into.

  • I'm not having trouble adding controls. I can add things to the hierarchy on the right. What I mean is that I can't open the visual designer.

  • Ah. Sorry I misunderstood. Just to clarify, you want to be able to visually drag rendered controls onto the page and move them around a'la icons on a desktop?

    I don't know if that's possible because I've never been able to do it. I just use those buttons to preview elements inserted in code or live in the QML Properties view.

    Perhaps someone else has information on this.

  • I'd be satisfied if I could just get the visual designer to work, even if it's just for previewing and not for dragging controls.
  • Aha! The only thing I see in your screen that's different from my setup is that you're using the simulator whereas I use physical devices.

    I don't know if this is disabling your preview utility but I'll try the simulator later and let you know if it works for me.

     

  • I used the momentics-2.1..2-201503050937 installer, java 10 (although it works with java 8 on mac) and the only issue I encountered was the simulator installer requiring additional command line arguments. This was a fresh Windows 10 install and everything works seamlessly so I don't know what could be disabling your designer. Perhaps noteworthy is that I let momentics download the tools as opposed to manually installing them.

    I don't think the simulator would affect the editing and momentics works even without an attached device, so I can only suggest a fresh install of momentics. I hope you are able to resolve this. All the best.

  • Indeed, I think this might be an issue with the sdk tools installed. When I renamed the target libraries folder in my bbndk installation, those buttons were disabled. Try going into Help->Install New Software then select "All Available Sites" and install the tools from there.
  • It works now that I installed a new SDK with the automatic installer. Thank you very much.

    It looks like when I did the manual install from disk, I missed bbndk.win32.cshost.10.3.1.995.zip which contains qmlpreview.exe.

Back