2010/4/21 Sebastian Barthmes <sebastian.barth...@googlemail.com>

> Hi there!
>
> I'd like to open multiple windows (with qt backend) for 3D display. Here's
> a simple example:
>
>
> ###############
>
> import OCC.Display.SimpleGui
>
> #Open the first Window
> OCC.Display.SimpleGui.set_backend('qt')
> display, start_display, add_menu, add_function_to_menu =
> OCC.Display.SimpleGui.init_display()
> start_display()
>
> #Make sure the old object are destroyed:
> del display
> del start_display
>
> #Now do the same thing again after the old window is closed, this one
> throws an exception:
> OCC.Display.SimpleGui.set_backend('qt')
> display, start_display, add_menu, add_function_to_menu =
> OCC.Display.SimpleGui.init_display()
> start_display()
>
> ###############
>
>
> The Exception which is thrown now:
> QWidget: Must construct a QApplication before a QPaintDevice
> Aborted (Speicherabzug geschrieben)
>
>
> How can I get this to work?
>
> Further I'd like to know whether it is possible to open the window for
> display but let the code continue.
>
> Thanks in advance for your help!
>
>
> Sebastian
>
>
Dear Sebastian,

The SimpleGui module only provides a quick and easy way to visualize
topological instances. I does not aim at replacing a complete GUI management
system such as PyQt or wxPython.

If you want advanced or customized GUI features, I suggest you embed (or
subclass) the wxViewer3d (wxPython) or qtViewer3d (PyQt) widgets as you
would do for any graphical interface development.

Best Regards,

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

Reply via email to