Skip to content
New issue

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

only one of the subplots work on 4k monitor #241

Open
sunilpulinthitta opened this issue Oct 28, 2022 · 0 comments
Open

only one of the subplots work on 4k monitor #241

sunilpulinthitta opened this issue Oct 28, 2022 · 0 comments

Comments

@sunilpulinthitta
Copy link

sunilpulinthitta commented Oct 28, 2022

I can move the app to 2k monitor and all subplots become responsive, but as I move it to the 4k monitor all except one works. I also ran the code on a MacBook Air and had the same issue as it had a high resolution screen.

import sys
import os
from qtpy import QtWidgets
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, shape=(2, 2))
        vlayout.addWidget(self.plotter.interactor)
        self.signal_close.connect(self.plotter.close)

        self.frame.setLayout(vlayout)
        self.setCentralWidget(self.frame)

        self.plotter.subplot(0, 0)
        self.plotter.add_mesh(pv.Sphere())
        self.plotter.subplot(0, 1)
        self.plotter.add_mesh(pv.Cylinder())
        self.plotter.subplot(1, 0)
        self.plotter.add_mesh(pv.Cube())
        self.plotter.subplot(1, 1)
        self.plotter.add_mesh(pv.Cone())

        if show:
            self.show()


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = MyMainWindow()
    sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant