Plot API not loaded for plots created in Designerplugins.

Issue #117 closed
thomas kipp created an issue

If plots are only created in a designerplugin at runtime like “new Itom1DQwtPlot()”, the plot API is not loaded.

It would be useful if a (re-)push of the api could be triggered.

Comments (5)

  1. M. Gronle

    Information: The current situation is, that the API functions of itom (both the core API as well as plot APIs) are pushed from itom to all widgets, that are derived from ito::AbstractApiWidget or ito::AbstractFigure if a plot is created or if an ui file is parsed and displayed. If a widget is created at a later time during runtime,
    this push is currently not done. Therefore the API functions are currently not pushed to new widgets, that are derived from these classes.

    The relevant methods are:

    void UiOrganizer::setApiPointersToWidgetAndChildren(QWidget *widget)

    void DesignerWidgetOrganizer::setApiPointersToWidgetAndChildren(QWidget *widget)

  2. M. Gronle

    Now, plots and other widgets can be added to an user interface via Python at runtime. If this approach is used, the API is properly propagated to these new widgets (if they are itom plot widgets). Is this sufficient to close this issue?

  3. thomas kipp reporter

    When the Issue was created I “solved” this problem by adding an invisible Plot to the ui-File. Now I deleted this plot and don’t get errors anymore if I create a new plot in the plugin at runtime. So the orgignal issue seems to be solved.

    Even if this was not the case I would regard this as solved, since I can now add widgets at runtime via Python.

  4. Log in to comment