2013/3/29 Kene Meniru <kene.men...@illom.org>

> Mark Blome wrote:
>
> >
> > Hi Kene,
> >
> > I had a similar issue with OCC display initialization (I use tabs in my
> > application, each of which contains a QtGui.QMainWindow).
> >
>
> Hi Mark:
>
> Thanks for the reply and your solution. I was beginning to feel like I was
> alone in this problem.
>
> Let me just add my solution to the basket as well.
>
> I realized that qtViewer3d is dealing with multiple inheritance (in
> OCCViewer.Viewer3d) so I changed the __init__ call in my main program and
> that seems to work. Here is a short version of my main program. I did not
> have to change qtDisplay or qtView3d from the PythonOCC distribution.
>
> ------ AppGUI __init__ code
>
> import sys
> from PyQt4 import QtCore, QtGui
> import qtDisplay
>
>
> class AppGUI(QtGui.QMainWindow):
>     def __init__(self, *args):
>         QtGui.QMainWindow.__init__(self, *args)
>         # setup prefered interface
>         self.treeArea = QtGui.QTreeWidget()
>         self.textArea = QtGui.QTextEdit()
>         self.viewArea = QtGui.QTabWidget()
>         self.msgArea = QtGui.QTextBrowser()
>         # Add tabs
>         self.modelTab = qtDisplay.qtViewer3d(self)
>         self.reportTab = QtGui.QTextBrowser()
>         self.viewArea.addTab(self.modelTab, "Model")
>         self.viewArea.addTab(self.reportTab, "Report")
>         # Window area splitters
>         self.vSplitter = QtGui.QSplitter(QtCore.Qt.Vertical)
>         self.vSplitter.addWidget(self.viewArea)
>         self.vSplitter.addWidget(self.msgArea)
>         self.hSplitter = QtGui.QSplitter(QtCore.Qt.Horizontal)
>         self.hSplitter.addWidget(self.treeArea)
>         self.hSplitter.addWidget(self.textArea)
>         self.hSplitter.addWidget(self.vSplitter)
>         # Assign mainwindow
>         self.setCentralWidget(self.hSplitter)
>
>
> if __name__ == '__main__':
>     app = QtGui.QApplication(sys.argv)
>     win = AppGUI()
>     win.show()
>     win.modelTab.InitDriver()
>     win.modelTab._display.Test()
>     app.exec_()
>
>
> --
>
> Kene
> ::::::::::::::::::
> kemen...@gmail.com
>
>
Hi Mark, Kene,

Thanks for reporting Qt related issues. It's been a while I did not work on
the Qt occ window, it works just as I need on OSX. If there is a need for a
change or improvement in the DIsplay package , could you please open an
issue on  the github pythonocc repos?

A few weeks ago, I tried to replace PyQt4 with PySide (with just replacing
'from PyQt4 from' occurences with 'from PySide import') but it did not work
on Windows. Do you have any experience with this kind of work?

Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to