Skip to content

Commit abbcec7

Browse files
committed
Fix PySide6 bug in QwtPlot event handling
1 parent edcc3f9 commit abbcec7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

qwt/plot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import math
2323

2424
import numpy as np
25-
from qtpy.QtCore import QEvent, QRectF, QSize, Qt, Signal
25+
from qtpy.QtCore import QEvent, QRect, QRectF, QSize, Qt, Signal
2626
from qtpy.QtGui import QBrush, QColor, QFont, QPainter, QPalette
2727
from qtpy.QtWidgets import QApplication, QFrame, QSizePolicy, QWidget
2828

@@ -999,6 +999,10 @@ def setCanvas(self, canvas):
999999
canvas.show()
10001000

10011001
def event(self, event):
1002+
# Workaround for a bug with PySide6 on Linux:
1003+
if isinstance(event, QRect):
1004+
return
1005+
10021006
if event.type() == QEvent.LayoutRequest:
10031007
self.updateLayout()
10041008
elif event.type() == QEvent.PolishRequest:

0 commit comments

Comments
 (0)