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
Hello!
The size of the Qt window with QtInteractor heavily impacts the CPU usage, consuming even up to full 3 threads when multiple meshes are rendered:
The issue happens only on Linux (even on different mechines), when the same code is running on Windows everything is fine.
Have You ever seen something like this?
import sys import os os.environ["QT_API"] = "pyqt5" from qtpy import QtWidgets import numpy as np import pyvista as pv from pyvistaqt import QtInteractor, MainWindow class MyMainWindow(MainWindow): def __init__(self, parent=None, show=True): QtWidgets.QMainWindow.__init__(self, parent) # create the frame self.frame = QtWidgets.QFrame() vlayout = QtWidgets.QVBoxLayout() # add the pyvista interactor object self.plotter = QtInteractor(self.frame) vlayout.addWidget(self.plotter.interactor) self.signal_close.connect(self.plotter.close) self.frame.setLayout(vlayout) self.setCentralWidget(self.frame) # simple menu to demo functions mainMenu = self.menuBar() fileMenu = mainMenu.addMenu('File') exitButton = QtWidgets.QAction('Exit', self) exitButton.setShortcut('Ctrl+Q') exitButton.triggered.connect(self.close) fileMenu.addAction(exitButton) # allow adding a sphere meshMenu = mainMenu.addMenu('Mesh') self.add_sphere_action = QtWidgets.QAction('Add Sphere', self) self.add_sphere_action.triggered.connect(self.add_sphere) meshMenu.addAction(self.add_sphere_action) if show: self.show() def add_sphere(self): """ add a sphere to the pyqt frame """ for i in range(10): x,y,z = np.random.rand(3) sphere = pv.Sphere(center=[x,y,z],radius=0.1) self.plotter.add_mesh(sphere) self.plotter.reset_camera() if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) window = MyMainWindow() sys.exit(app.exec_())
The text was updated successfully, but these errors were encountered:
Was anyone able to reproduce the bug?
Sorry, something went wrong.
No branches or pull requests
Hello!
The size of the Qt window with QtInteractor heavily impacts the CPU usage, consuming even up to full 3 threads when multiple meshes are rendered:
QtInteractor2.mp4
The issue happens only on Linux (even on different mechines), when the same code is running on Windows everything is fine.
Have You ever seen something like this?
The text was updated successfully, but these errors were encountered: