[vtkusers] Mac OS X x86_64 with Qt-4.5.x,vtk-5.3.x
Clinton Stimpson
clinton at elemtech.com
Tue Nov 18 14:14:10 EST 2008
I wonder if implementing vtkCocoaRenderWindow::SetWindowInfo() would fix
your problem. Did you get a warning about it not being implemented in
your console?
Clint
Chris Kees wrote:
> Hi,
>
> Yesterday I compiled the cvs head of vtk with the development snapshot
> of Qt-4.5 following some of the recent posts on running in 64-bit with
> Cocoa. If I set useMainWindow=False then the code below runs fine,
> otherwise I get an EXC_BAD_ACCESS signal when I call mainWindow.show()
> (output from gdb is below). Has anybody been able to add the vtk
> widget to a QFrame yet? I'm new to GUI programming, and I'm not sure I
> follow everything covered in the previous posts. There is a comment
> in the QVTKRenderWindow documentation about need to call
> SetDisplayId() and SetWindowId() in certain situations, but I don't
> know how to call those. Thanks for any suggestions.
>
> Chris
>
> if useMainWindow:
> #Qt widgets
> self.frameWidget = QtGui.QFrame(g.mainWindow)
> self.hbox = QtGui.QHBoxLayout()
> self.iren = QVTKRenderWindowInteractor(self.frameWidget)
>
> self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
> self.iren.Initialize()
> self.renWin = self.iren.GetRenderWindow()
> self.renWin.SetWindowName(name)
> self.hbox.addWidget(self.iren)
> self.frameWidget.setLayout(self.hbox)
> g.tabWidget.addTab(self.frameWidget,title)
> screen = QtGui.QDesktopWidget().screenGeometry()
> size = g.mainWindow.geometry()
> (x,y) = (screen.width()-comm.size()*size.width())/2,
> (screen.height()-size.height())/2
> g.mainWindow.move(x+comm.rank()*size.width(),y)
> g.mainWindow.show()
> else:
> self.iren = QVTKRenderWindowInteractor()
>
> self.iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
> self.iren.Initialize()
> self.renWin = self.iren.GetRenderWindow()
> self.renWin.SetWindowName(name)
>
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000018
> 0x0000000109de35c8 in QPaintEngine::setSystemClip ()
> (gdb) back
> #0 0x0000000109de35c8 in QPaintEngine::setSystemClip ()
> #1 0x0000000109ccb60d in -[QCocoaView drawRect:] ()
> #2 0x00007fff83e1c7ab in -[NSView _drawRect:clip:] ()
> #3 0x00007fff83e1b291 in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #4 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #5 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #6 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #7 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #8 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #9 0x00007fff83e1b65e in -[NSView
> _recursiveDisplayAllDirtyWithLockFocus:visRec
> t:] ()
> #10 0x00007fff83e199be in -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:
> isVisibleRect:rectIsVisibleRectForView:topView:] ()
> #11 0x00007fff83e19220 in -[NSThemeFrame
> _recursiveDisplayRectIfNeededIgnoringOp
> acity:isVisibleRect:rectIsVisibleRectForView:topView:] ()
> #12 0x00007fff83e15a86 in -[NSView
> _displayRectIgnoringOpacity:isVisibleRect:rec
> tIsVisibleRectForView:] ()
> #13 0x00007fff83d533cb in -[NSView displayIfNeeded] ()
> #14 0x00007fff83d52ec0 in -[NSWindow displayIfNeeded] ()
> #15 0x00007fff83e11be8 in -[NSWindow
> _reallyDoOrderWindow:relativeTo:findKey:for
> Counter:force:isModal:] ()
> #16 0x00007fff83e115e8 in -[NSWindow orderWindow:relativeTo:] ()
> #17 0x00007fff83dd8e94 in -[NSWindow makeKeyAndOrderFront:] ()
> #18 0x0000000109cc2b3b in QWidgetPrivate::show_sys ()
> #19 0x0000000109d5bbee in QWidgetPrivate::show_helper ()
> #20 0x0000000109d5c24c in QWidget::setVisible ()
> #21 0x0000000109594e0e in sipQMainWindow::setVisible ()
> #22 0x0000000109746409 in meth_QWidget_show ()
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list