|Pyqtgraph with QML||Papee||10/31/12 7:35 AM|
Could anyone point me to a simple example where we can use pyqtgraph inside a QML generated window?
Thanks in advance - papee
|Re: [pyqtgraph] Pyqtgraph with QML||Luke Campagnola||10/31/12 12:23 PM|
I have not worked with QML at all, but my impression is that it is still very new and QML+Python is experimental at best. PySide claims to have some support for QML but I have not seen this in use anywhere outside of some very basic examples. PyQt appears to have incomplete support for QML (notably, it does not support qmlRegisterType).
So I think the answer for now is no, but in time this could become a possibility.
|Re: Pyqtgraph with QML||Papee||11/5/12 12:54 PM|
I have raised a question regarding pyqtgraph and qml in stackoverflow http://stackoverflow.com/questions/13240066/graph-pyqtgrapg-is-not-getting-plotted-inside-qml-generated-window . I got the graph window but no plotting. If you have any suggestion please reply.
|Re: [pyqtgraph] Re: Pyqtgraph with QML||Luke Campagnola||11/5/12 2:12 PM|
Cool! I'm impressed it works at all. Thanks for figuring that out!
My best guess is that the problem is related to this bug:
However it only appears to be a problem within the QML context.
You can work around the problem by commenting out the 'itemChange' method in pyqtgraph/graphicsItems/GraphicsObject.py.
|Re: Pyqtgraph with QML||Papee||11/6/12 3:21 AM|
Thanks Luke, It worked.
|Re: Pyqtgraph with QML||Papee||11/6/12 3:36 AM|
I know how hard to search for working examples, This is my code, if it helps someone!
Created on 03-Nov-2012
Main.py : Executable for creating application GUI...
|Re: Pyqtgraph with QML||Papee||11/11/12 9:32 AM|
When running the above program , Memory is getting eaten up.
It is slowly getting increasing. If we leave the program like that I think the
system will purge it. Any solution ?
|Re: [pyqtgraph] Re: Pyqtgraph with QML||Luke Campagnola||11/11/12 10:55 AM|
No solution yet, but here's some detective work:
1) Stopping the timer also stops the memory leak
2) Removing QML from the system and using a regular GraphicsView instead does not help
3) Switching to PyQt4 instead of PySide fixes the problem.
4) It does not appear that there are any python objects being leaked (see below). Putting this together with #3 suggests that the leak is internal to the PySide library. The question remains, then, whether this is due to a PySide bug or improper use of the library.
Here's why I don't think there are any python objects being leaked: If you disable the timer and add some code immediately before the Qt event loop is started:
Then you'll get a console you can do some testing from (this is necessary because PySide still blocks the Python interactive prompt). In the console, I ran this code:
This outputs a lot of information, but at the end is this:
So only 116 'persistent' objects are present in this test, none of which are large objects like arrays, graphics items, etc.
I wouldn't consider this proof that nothing is being leaked from pyqtgraph, but it's reasonably strong evidence.