-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Description
The following single cell finishes instantly and displays an unresponsive window:
%gui qt6
import numpy as np
import pyqtgraph as pg
from PyQt6 import QtWidgets
class MainWindow(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("PyQtGraph Minimal Example")
self.plot_widget = pg.PlotWidget()
self.setCentralWidget(self.plot_widget)
x = np.arange(5)
y = np.exp(x)
self.plot_widget.plot(x, y, pen=pg.mkPen(color='b', width=2)) # Blue line, 2px width
self.statusBar().showMessage("Done!")
mw = MainWindow()
mw.show()
pg.exec() makes the window work, but the notebook is now busy.
Tried with
3.13.5 (tags/v3.13.5:6cb20a2, Jun 11 2025, 16:15:46) [MSC v.1943 64 bit (AMD64)]
numpy 2.3.4
pyqtgraph 0.13.7
IPython 9.6.0
and
3.14.0 (tags/v3.14.0:ebf955d, Oct 7 2025, 10:15:03) [MSC v.1944 64 bit (AMD64)]
numpy 2.3.4
pyqtgraph 0.13.7
IPython 9.6.0
Metadata
Metadata
Assignees
Labels
No labels