Skip to content
Advertisement

finplot as a widget in layout

I am trying to add finplot, https://pypi.org/project/finplot/, as a widget to one of the layouts in my UI. I created a widget for finplot and added it to the widgets in the layout but I get the following error:

JavaScript

Here is the code that I used.

JavaScript

Advertisement

Answer

The create_plot_widget() function creates a PlotItem that cannot be added to a layout, the solution is to use some QWidget that can display the content of the PlotItem as the PlotWidget:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement