Switch to: V12V11V10V9V8V7V6V5

Form Editor - Modal And Non-Modal Forms

Starting with Valentina Studio v10.5 the forms can be either modal or non-modal.

A modal form is a form that blocks input to other visible windows within the Valentina Studio. Forms that are used to request information from the user or that are used to set preferences are usually modal.

When a modal form is opened, the user must finish interacting with the form and close it before they can access any other window in the application.

The most common way to display a modal form is to call its exec() function. When the user closes the dialog, exec() will provide a useful return value. To close the dialog and return the appropriate value, you must call accept() or reject() form method. Alternatively, you can call the done() with Accepted or Rejected.

An alternative is to set dlg.modal = true (or check Modal property of the form), then show(). Unlike exec(), show() returns control to the caller immediately.

Non-Modal Form

A non-modal (modeless) form is a form that operates independently of other windows. Find and replace dialogs in word-processors are often modeless to allow the user to interact with both the application's main window and with the dialog.

If the form is defined to be non-modal, it is displayed using show(), which returns control to the caller immediately.

You can execute a non-modal form and switch back to the Valentina Studio main window. Non-modal forms can be shown from other non-modal forms.

On attempt to show non-modal form from modal form, the non-modal will not get the input focus.