Hi,
I've been developing a GUI app to display and analyze time series using pyqtgraph.
One of the problems I am currently facing is that I cannot export the figures using the default pyqtgraph context menu.
When I do an SVG export I see the following errors in the console:
QPainter::deviceTransform: Painter not active
QPainter::deviceTransform: Painter not active
QPainter::deviceTransform: Painter not active
QPainter::deviceTransform: Painter not active
When I do a PNG export I see the following errors:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pyqtgraph/exporters/Exporter.py", line 77, in fileSaveFinished
self.export(fileName=fileName, **self.fileDialog.opts)
File "/usr/lib/python3/dist-packages/pyqtgraph/exporters/ImageExporter.py", line 70, in export
bg = np.empty((self.params['width'], self.params['height'], 4), dtype=np.ubyte)
TypeError: 'float' object cannot be interpreted as an integer
When I export SVG, despite the errors, an SVG file is created. However it only features the legend.
In my code I subclass PlotWidget, PlotDataItem and ScatterPlotItem. The PlotDataItem and ScatterPlotItem are attached to PlotWidget. I don't think I reimplement any methods of the base class, I only add features to the classes. I think Qt related things are not correctly initialized, hence the "Painter not active" message. I cannot explain the PNG exception however.
I use pyqtgraph 0.10.0, pyqt 5.11.3 and python 3.7.2+
The relevant code is in plotwidget.py, tsplot.py and curves.py under graphysio/plotwidgets.
Here are two screenshots showing the running app and the exported SVG:


Any help would be greatly appreciated.
Kind regards,
Jona Joachim