We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versions
Python: 3.10.8 PyQt5: 5.15.7 PyQt5-sip: 12.11.0 QCustomPlot_PyQt5: 2.1.1.1
Description
I've tried to subclass QCPGraph to add extra handling for selection but found that overriding selectTest() method breaks the selection completely.
selectTest()
Test case
#!/usr/bin/env python3 from PyQt5.QtCore import Qt from PyQt5.QtGui import QPen, QColor from PyQt5.QtWidgets import QMainWindow, QApplication import QCustomPlot_PyQt5 as qcp class CustomGraph(qcp.QCPGraph): def selectTest(self, *args): # I've also tried with the signature, no luck return super().selectTest(*args) app = QApplication([]) win = QMainWindow() win.setWindowTitle('Test') win.setMinimumSize(1024, 768) plot = qcp.QCustomPlot() plot.setInteraction(qcp.QCP.iSelectPlottables, True) data = list(range(1, 100)) graph = CustomGraph(plot.xAxis, plot.yAxis) graph.setPen(QPen(QColor(Qt.red), 10)) graph.setData(data, data) win.setCentralWidget(plot) win.show() app.exec_()
Expected behavior
Clicks select the plottable.
Actual behavior
No selection happens.
A note: while the click selection is broken, the rect selection is working somehow.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Versions
Python: 3.10.8
PyQt5: 5.15.7
PyQt5-sip: 12.11.0
QCustomPlot_PyQt5: 2.1.1.1
Description
I've tried to subclass QCPGraph to add extra handling for selection but found that overriding
selectTest()
method breaks the selection completely.Test case
Expected behavior
Clicks select the plottable.
Actual behavior
No selection happens.
A note: while the click selection is broken, the rect selection is working somehow.
The text was updated successfully, but these errors were encountered: