Brain Innovation

support portal

When you write a plug-in or script with a user interface (created in QT Designer), you will  always have a UI (user interface) file and need a script to communicate with your user interface. Making this script costs quite some time because you need to pay a lot of attention to the exact naming you used in the User Interface and there is no way to debug the script in case you made a spelling mistake. The "Script from UI" plug-in will analyze the UI file and automatically write a script, recognizing the basic script elements and creating functions for all buttons.

It currently does the following:

  • Writes the "default" first couple of lines using the UI name.
  • Recognizes 4 elements: push buttons, radio button, check boxes and spin boxes 
  • Uses bvqx.FindChild in the initDlg function to store the GUI elements in variables that have their exact name for quick access in all later functions.
  • Connects push buttons to functions it automatically creates, setting the Command String if used with a plug-in.
  • Finishes with default returnScriptObj part.
  • Saves the script automatically in the same directory as the UI with "_auto.js" added to the filename so you can adapt the script and save it without "auto" in the filename when finished.

Download the Plug-in for BrainvoyagerQX 2.2

ScriptFromUI Windows 32-bit
ScriptFromUI Windows 64-bit
ScriptFromUI Mac (compiled in Snow Leopard)

note: You can also use it with brainvoyager 2.1 but then you need to replace "bvqx.FindChild" with "dlg.findChild"

You are here: HomeBrainVoyagerAvailable ToolsAvailable Plugins ≫ Automatically create script from user interface