You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering drawing errors on the docking system when running my application. My application uses vtk for 3d opengl visuals.
The cause seems to boil down to calling wid = self.winId() in the main widget (in my case QVTKRenderWindowInteractor).
The example below reproduces this issue on a dummy widget.
explorer_ccHB2uBT4F.mp4
Reproduce
importPySide6QtAdsfromPySide6QtAdsimportCDockManager, CDockWidgetfromPySide6.QtWidgetsimport (
QApplication,
QLabel,
QMainWindow,
QVBoxLayout,
QWidget,
)
# This class mimics the QVTKRenderWindowInteractor class from vtkmodules.qt.QVTKRenderWindowInteractorclassDummyOpenGLWidget(QWidget):
def__init__(self, parent=None):
super().__init__(parent)
wid=self.winId() # <---- this line triggers the error; needed for functionalityif__name__=="__main__":
app=QApplication()
mw=QMainWindow()
dock_manager=PySide6QtAds.CDockManager(mw)
# create the central widget dockmain_widget=QWidget()
# setup a vtk widget in the central dock and display a cube in itmain_layout=QVBoxLayout(main_widget)
vtk_widget=DummyOpenGLWidget(main_widget)
main_layout.addWidget(vtk_widget)
central_dock=PySide6QtAds.CDockWidget(dock_manager, "Central Dock")
central_dock.setWidget(main_widget)
central_dock_area=dock_manager.setCentralWidget(central_dock)
d=PySide6QtAds.CDockWidget(dock_manager, "Dock")
lbl=QLabel(f"Draw artifacts when resizing while undocked")
d.setWidget(lbl)
dock_manager.addDockWidget(PySide6QtAds.DockWidgetArea.LeftDockWidgetArea, d)
mw.show()
app.exec()
I'm encountering drawing errors on the docking system when running my application. My application uses vtk for 3d opengl visuals.
The cause seems to boil down to calling wid = self.winId() in the main widget (in my case QVTKRenderWindowInteractor).
The example below reproduces this issue on a dummy widget.
explorer_ccHB2uBT4F.mp4
Reproduce