Hi Henrik, This is a OSX only issue. Having QT & pythonOCC working together on OSX is perhaps difficult to achieve. The OGL that OCC has been built with, is that of X11, while QT is implemented on top of Quartz / Cocoa. Could that perhaps explain it? I'm simplying echo'ing what Thomas explained me before.
You mentioned to me that you were able to get the demo app in Cocoa ( OCC cocoa patch Emmanual ) running. Well, it would be an absolute dream if somehow, someway we'd be able to get this working with pythonOCC too! Cheers, -jelle On Wed, Feb 3, 2010 at 6:31 PM, Henrik Rudstrom <hrudst...@googlemail.com>wrote: > Hi > First of all thanks for the new osx build! > Was in an optimistic mood today, so i thought i'd try to get occ working in > qt, but i got a good old overflow error. > > 4317497200 <<---- window._handle which is more than 2 ^ 32 > Traceback (most recent call last): > File "qtocc.py", line 33, in <module> > window.glWidget.InitDriver() > File "/Library/Python/2.6/site-packages/OCC/Display/qtDisplay.py", line > 122, in InitDriver > self._display.Create() > File "/Library/Python/2.6/site-packages/OCC/Display/OCCViewer.py", line > 79, in Create > self.Init(self._window_handle) > OverflowError: in method 'Display3d_Init', argument 2 of type 'int' > > seems the visualization module cant handle 64bit numbers, isnt that a bit > wierd if the build is 64 bit? or is this a osx issue, does the qt viewer > work on other platforms? > would the fix be just a matter of changing a few typedef's or does that > propagate throught the whole framework? > > > > Henrik Rudstrom > > > code i used: > > import sys > from OCC.Display.qtDisplay import qtViewer3d > from PyQt4 import QtGui > > class Window(QtGui.QWidget): > def __init__(self): > super(Window, self).__init__() > self.glWidget = qtViewer3d() > mainLayout = QtGui.QHBoxLayout() > mainLayout.addWidget(self.glWidget) > self.setLayout(mainLayout) > self.setWindowTitle(self.tr("Hello GL")) > self.glWidget > #self.glWidget.DisplayShape(BRepPrimAPI_MakeSphere(1).Shape()) > > if __name__ == '__main__': > app = QtGui.QApplication(sys.argv) > window = Window() > window.show() > window.glWidget.InitDriver() > window.glWidget._display.Test() > sys.exit(app.exec_()) > > _______________________________________________ > Pythonocc-users mailing list > Pythonocc-users@gna.org > https://mail.gna.org/listinfo/pythonocc-users > >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users