Files
grum/mdisubplot.py
T

23 lines
542 B
Python

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QMdiSubWindow
import pyqtgraph as pg
import assets
class MDISubPlot(QMdiSubWindow):
def __init__(self, title, desc, *args, **kwargs):
super().__init__(*args, **kwargs)
self.setWindowTitle(title)
self.setWindowIcon(assets.char())
# without this, the SubWindow is not removed from the subWindowList
self.setAttribute(Qt.WA_DeleteOnClose)
plt = pg.PlotWidget()
self.plot = desc.make_plot(plt)
self.setWidget(plt)