addCallback in qtWidget
See original GitHub issueHello @marcomusy,
I have been used addCallback
in vedo2020 version and it worked. Recently, I upgraded my vedo verison to 2021.0.2, and I just found that the addCallback
function no longer works for my pyqt application. I realized in the 2021 version, you have simplified the addCallback
. The mousehighlight example works for me. I tried to adjust the related code according to the example, but always get the error as AttributeError: 'Plotter' object has no attribute '_timer_event_id'
The related code is something like
class Qt_App(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
super(Qt_App, self).__init__(parent)
self.setupUi(self)
self.vp = Plotter(qtWidget=self.vtkWidget)
self.vp.addCallback('LeftButtonPressEvent', self.select)
def select(self, evn):
print('hello!', evn)
Could you help me figure it out? Many thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
QCallbackMapping Class | Qt 3D 6.4.1 - Qt Documentation
Allows to map the channels within the clip onto an invocation of a callback object. More... Header: #include <QCallbackMapping>. CMake: ...
Read more >python - How to write a simple callback function?
I wrote the following code to test a simple callback function. def callback(a, b): print('Sum = {0}' ...
Read more >help about PyQt Twisted Thread - Google Groups
Hello, everyone, I have a twisted use in python. The red part of the problem in the following code. I want a process...
Read more >Radio-Qt5/radio.py at main · aptrinh/Radio-Qt5 · GitHub
addCallback ("right", self.right_clicked). self.LircHandler.addCallback("power", self.power_clicked) ... setStyleSheet("QWidget#Dialog {background-image: ...
Read more >Example usage for com.google.common.util.concurrent ...
addCallback (task, new FutureCallback<Integer>() { @Override public void ... resize(final int width, final int height) { final QWidget view = this.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @marcomusy, Thanks a lot. The github version works!
Hi Bruce, sorry for the late reply, after:
pip install -U git+https://github.com/marcomusy/vedo.git
you should be able to run the example: https://github.com/marcomusy/vedo/blob/master/examples/other/qt_window1.pyLet me know if you encounter any problems