Important: Please read the Qt Code of Conduct -

Qt Creator 2.7.x: creating action groups in Form Editor?

  • Hi, everyone. I wonder if it is possible at all to insert action groups into tool bars and menus from Form Editor. In earlier versions of Creator, one could select 'New Action Group', but now the only option is to insert an action. It would be quite awkward if one had to group separately in code actions created with Form Editor.

    Maybe, at least it is possible to insert an action group by editing the form source?

    Any comments would be greatly appreciated.

  • Well, since no-one has so far voluneered any comments, I'll post the results of my own reseach, in case someone needs them. This feature appears to have been dropped in passing from Qt 3 to Qt 4, and the word from the developers I've just got is that there are no plans to support it.

    The ui format "schema": still defines action groups, and one can manually insert them into an ui form by wrapping the actions to be grouped by <actiongroup name="GroupName"> and </actiongroup>. Uic (as of 5.1.0 beta) honours this and creates an action group accessible through ui->. When the application is run, the behaviour of grouped actions is as expected (i.e. mutually exclusive by default).

    Manually inserted action groups do not show up in Qt Widget Designer (as if they did not exist).

  • this doesn't make sense, i thought mutually exclusive action (check) groups are a common thing in an application ?? They are radio buttons for the menu, Why not support this in the GUI, and worse, why go from having a feature that is so common in development, to not having it? You know when people take key features out like this, it is those 'little' things that make developers just entering into your framework want to turn tail and go elsewhere...

    I'm not trying to come off as lazy or anything, I understand it isn't too hard to add them manually from the code (which is easier than adding markup to the .ui) but still, keeping things separate (design, implementation) separate becomes an issue here. UI designers dont want to muck around in code where they don't belong, and coders don't want to muck around implementing code that should have been done in the UI by the designers in the first place... see where I'm going with this?? Hopefully one day this will be reconsidered for re-insertion.. If we can have signals/slots in the designer, then I'm sure it would be a walk in the park to put this back... :)

Log in to reply