I run into an issue running in a console :
No module named 'plotwidget'.
I’m running on Linux Manjaro with the last version of Python Qt, PyQt and python-pyqtgraph.
An idea about this issue ?
I have redone the GUI but I get still the same behaviour. Strangely, I can’t copy the output, she is always removed. That’s the first time but here the last lines:
QGraphicsView(QGraphicScene, parent: QWidget = None): argument 1 has unexpected type 'QWidget'
Here the code (under python import)
from pyqtgraph import PlotWidget, plot import pyqtgraph as pg from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5 import uic class graPhique(QMainWindow): def __init__(self, *args, **kwargs): super(graPhique, self).__init__(*args, **kwargs) ui_path = "ui/mainwindow.ui" current_path = os.path.dirname(os.path.realpath(__file__)) ui_file = os.path.join(current_path, ui_path) uic.loadUi(ui_file, self) self.plot([1,2,3,4,5,6,7,8,9,10], [30,32,34,32,33,3129,32,35,45]) def plot(self, hour, temperature): self.graphWidget.plot(hour, temperature) if __name__ == "__main__": app = QApplication(sys.argv) window = graPhique() window.show() sys.exit(app.exec_())
I precise that my
mainwindow.ui file is in a sub-folder called ui.
By advance Thanks.