taurus-org / taurus

Moved to https://gitlab.com/taurus-org/taurus
http://taurus-scada.org
43 stars 46 forks source link

Context menu does not appear in plot panel #1107

Closed LluisGi closed 4 years ago

LluisGi commented 4 years ago

Right click menu doesn't appears when reload a GUI

cpascual commented 4 years ago

Confirmed with py3qt5:

cpascual commented 4 years ago

Note: this may be a problem in taurus_pyqtgraph, since it does not affect other types of panels (e.g. TaurusImageDialog)

cpascual commented 4 years ago

I managed to reproduce it with pure Qt and pyqtgraph 0.11.0rc0 (no taurus involved):

import sys
from PyQt5 import Qt
import pyqtgraph as pg

app = Qt.QApplication([])
mainWin = Qt.QMainWindow()
plot = pg.PlotWidget()

mainWin.setCentralWidget(plot)
s = plot.saveState()
plot.restoreState(s)  # <-- commenting this out , the context menu works fine
# plot.setMenuEnabled(True)  # <-- as a workaround, this forces the enabling of the context menu
mainWin.show()
sys.exit( app.exec_() )

I checked that the issue was a glitch only in pyqtgraph 0.11.0rc0 (neither 0.10.0 nor 0.11.0 are affected).

Regarding the distributions:

Therefore it makes no sense to apply a workaround for 0.11.0rc0. I close this.