From: Bruce S. <Bru...@nc...> - 2009-09-09 00:50:42
|
I've put a link to your web site in the "Contributed" section of vpython.org, and mentioned this in the FAQ. Bruce Stef Mientki wrote: > > Bruce Sherwood wrote: >> I myself don't know anything about these other environments into which people >> want to embed Visual, so someone other than me will have to look for a solution. >> I thought that there had been some discussion a few months ago in this list by >> people who had successfully embedded Visual in some larger environment? >> >> > yep in wxPython, see > http://mientki.ruhosting.nl/data_www/pylab_works/pw_vpython_docking.html > > cheers, > Stef >> Bruce Sherwood >> >> Matteo Malosio wrote: >> >>> Hi, >>> no good news. I have tried to create an independent thread to manage >>> only VPython, but it didn't work :-) >>> >>> I really don't know how to solve the preblem. >>> >>> Thank you >>> >>> Matteo >>> >>> >>> >>> Piotr Byzia ha scritto: >>> >>>>> Dears, >>>>> I've a problem integrating VPython5 with PyQt4. If anyone can help me... >>>>> thanks a lot! >>>>> >>>>> >>>>> Here is the problem: >>>>> >>>>> The following code should show a PyQt4 form together with a VPython >>>>> scene. >>>>> Using VPython3 it works correctly, while useing VPython5 it crashes. >>>>> Does anyone has experience on facing this problem? >>>>> I would be very grateful if anyone can help me. >>>>> >>>>> from visual import * >>>>> from PyQt4 import QtCore, QtGui >>>>> import sys >>>>> >>>>> class MainWindow(QtGui.QMainWindow): >>>>> def __init__(self): >>>>> QtGui.QDialog.__init__(self) >>>>> >>>>> scene.visible = 1 >>>>> b = box() >>>>> >>>>> app = QtGui.QApplication(sys.argv) >>>>> window = MainWindow() >>>>> window.show() >>>>> sys.exit(app.exec_()) >>>>> >>>>> >>>>> replacing >>>>> >>>>> scene.visible = 1 >>>>> >>>>> >>>>> with >>>>> >>>>> scene.visible = 0 >>>>> >>>>> >>>>> it works and the Qt window is shown also with VPython5 (but the scene >>>>> can't be obviously seen!). >>>>> >>>> Hi Matteo, >>>> >>>> Recently, I also tried to embed VPython window into QT using PyQT, but >>>> also with no luck :( >>>> Have you discovered anything new on that matter? >>>> >>>> Below is my code: >>>> >>>> from PyQt4 import QtCore, QtGui >>>> >>>> from visual import * >>>> >>>> class Ball(QtGui.QGraphicsItem): >>>> def __init__(self): >>>> super(Ball, self).__init__() >>>> >>>> self.shape = sphere(pos=(17.047, 14.099, 3.625),radius=1) >>>> >>>> >>>> if __name__ == '__main__': >>>> >>>> app = QtGui.QApplication(sys.argv) >>>> >>>> scene_qt = QtGui.QGraphicsScene() >>>> scene_qt.setSceneRect(-300, -300, 600, 600) >>>> scene_qt.setItemIndexMethod(QtGui.QGraphicsScene.NoIndex) >>>> >>>> # scene2 = display(title='Graph of position', width=600, >>>> height=200, center=(5,0,0), background=(0,1,1)) >>>> >>>> ball = Ball() >>>> scene_qt.addItem(ball) >>>> >>>> # ball = sphere(pos=(17.047, 14.099, 3.625),radius=1) >>>> >>>> view = QtGui.QGraphicsView(scene_qt) >>>> view.show() >>>> >>>> sys.exit(app.exec_()) >>>> >>>> >>>> >>>> Best, >>>> Piotr Byzia >>>> >>> -- >>> ------------------------------------------------------- >>> Matteo Malosio, Eng. >>> Researcher >>> ITIA-CNR (www.itia.cnr.it) >>> Institute of Industrial Technologies and Automation >>> National Research Council >>> via Bassini 15, 20133 MILANO, ITALY >>> Ph: +39 0223699978 >>> Fax: +39 0223699925 >>> e-mail: mat...@it... >>> ------------------------------------------------------- >>> >>> >>> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >>> trial. Simplify your report design, integration and deployment - and focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |