X Error: BadWindow (invalid Window parameter) 3
Major opcode: 2 (X_ChangeWindowAttributes)
Resource id: 0x5600013
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 3 (X_GetWindowAttributes)
Resource id: 0x5600013
# -*- coding: utf-8 -*-
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from vtk import *
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
class GLViewer(QFrame):
def __init__(self, parent=None):
QFrame.__init__(self, parent)
iren = QVTKRenderWindowInteractor(self)
iren.Initialize()
iren.Start()
renderer = vtkRenderer()
iren.GetRenderWindow().AddRenderer(renderer)
cube = vtkCubeSource()
mapper = vtkPolyDataMapper()
mapper.SetInput(cube.GetOutput())
actor = vtkActor()
actor.SetMapper(mapper)
renderer.AddActor(actor)
Версии: PyQt4-4.4.4-r2 (пробовал 4.5, результат тот же), vtk-5.2.0-r1, xorg-server-1.6.1.901-r3 (пробовал 1.5.3-r6, результат тот же), qt-4.5.1, система Gentoo
Помогите их подружить.