Matplotlib widget in Qtdesigner
I am using Qtdesigner3 to write a python gui that will read data files do some math and then plot the results using matplotlib. I've looked at examples of matplotlib qt, but none of them use the designer.
My question is how do I create a开发者_开发百科 matplotlib widget in the QTdesigner?
There is a better response to almost this exact question over at the pythonxy mailling list
http://groups.google.com/group/pythonxy/browse_thread/thread/c52424bf11328181?pli=1
To quote the salient point from the thread. This is from one of the lead developers of the project.
You may directly use the Matplotlib Qt Designer plugin which is shipped with Python(x,y). It is located here: "C:\Python26\Lib\site-packages\PyQt4\plugins \designer\python". On your linux machine, create an environment variable called PYQTDESIGNERPATH, and set it to the directory containing 'matplotlibplugin.py'. That's all!
Python(x,y) has a matplotlib widget that can be used in Qt Designer. If you don't want to install Python(x,y), you can follow the instructions at this tutorial to create your own.
精彩评论