Simulating Events

While transition lines are useful for prototyping, in production you need to use the real signals from UI components to control the flow of the application. For this purpose, you can use action areas in a more advanced way, by having them listen to signals from flow items or the controls in them and by connecting these to the flow view. You can use keyboard shortcuts to simulate these events when you preview the UI.

When you use the wizard to create a Flow View component, select the Use event simulator checkbox to add an event simulator to the flow view.

You can create an event list where you assign keyboard shortcuts to events, and then use context-menu commands to attach the events to action areas or transition lines.

Creating Event Lists

To create an event list:

  1. Right-click in the 2D or Navigator view and select Event List > Show Event List.
  2. In the Event List dialog, select to add a keyboard shortcut for triggering an event to the list.

    "Event List dialog"

  3. In the Event ID field, enter an identifier for the event. To search for existing events, enter search criteria in the Filter field.
  4. In the Description field, describe the keyboard shortcut.
  5. In the Shortcut field, press the keyboard key that will trigger the event, and then select R to record the keyboard shortcut. The key identifier appears in the field.

You can now assign the events to action areas and transitions.

Assigning Events to Actions

To assign events to actions:

  1. Select eventListSimulator in Navigator, and in Properties > Exposed Custom Properties, select the active checkbox. If eventListSimulator is not visible in the Navigator, select .
  2. In Navigator, select an action area or transition line.
  3. In the context menu, select Event List > Assign Events to Actions.

    "Assign Events to Actions dialog"

  4. To connect an event, select Connect next to an event in the list. To release a connected event, select Release.
  5. Press Alt+P to preview the UI.
  6. Select action areas in the preview, double-click events in the event list, or use the keyboard shortcuts to trigger events.

    "Event list in Live Preview"

Available under certain Qt licenses.
Find out more.