Embedding a runtime graph in Qt3 designer generated UI

Madhusudan Singh spammers-go-here at spam.invalid
Tue Aug 9 17:54:59 EDT 2005


Phil Thompson wrote:

>> 2. In the same vein, how does one embed a runtime plot in a qt3 UI ? It
>> will
>> need to be a python solution since I am using python libraries to acquire
>> the data.
> 
> Have a look at PyQwt which is a set of Python bindings for the Qt-based
> Qwt plotting library.
> 
> Phil

Can a designer plugin be used this way ?

I tried inserting a FileChooser (available as an .so file under designer
plugins) object onto the main window and then used pyuic.

Traceback (most recent call last):
  File "measure.py", line 16, in ?
    f = MEASURE()
  File "/home/m_singh/measure.py", line 422, in __init__
    self.fileChooser1 = FileChooser(self.groupBox4,"fileChooser1")
NameError: global name 'FileChooser' is not defined

        The wrapper in my .py file :

from qt import *
from measure import *
import sys
if __name__ == "__main__":
    app = QApplication(sys.argv)
    f = MEASURE()
    f.show()
    app.setMainWidget(f)
    app.exec_loop()

        An attempt to use QwtPlot gives the same kind of error. Or is the only way
forward for me to generate a .py file from non-plugin objects, and then
hand code the pyqwt part into that result (Or use Python: in the ui).



More information about the Python-list mailing list