473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Embedding a runtime graph in Qt3 designer generated UI

Hi

Two questions :

1. Is it possible to use an import command in a qt3 designer code ? (I know
that it is possible to write python inside the braces -- but is it possible
to use an import command for some rather large libraries I wrote that I
need to access ?).

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.
Aug 8 '05 #1
2 1673
> Hi

Two questions :

1. Is it possible to use an import command in a qt3 designer code ? (I
know
that it is possible to write python inside the braces -- but is it
possible
to use an import command for some rather large libraries I wrote that I
need to access ?).
You can include import statements in Designer's comment dialog by
prefixing them with "Python: ". This is covered in the PyQt documentation.
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

Aug 8 '05 #2
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).
Aug 9 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: filip stas | last post by:
How do i add references during runtime?
2
by: Jeff Blee | last post by:
I am hoping someone can help me. I am making a Access 97 app for a person and have run up against a problem to do with MS Graph. There is a table that has a number of data elements and a date field...
2
by: Homer | last post by:
Hi, Have a quick question: Lets say I have a Hashtable of values hence 56 37.890 1 12.768 5 9.764 etc.... Is there a way for me to draw a chart in C# of this. FYI its actually lottery...
1
by: Bruno Palozzi | last post by:
Hi, does anyone out the know how I can create a runtime web component in asp.net. For example, I am trying to dynamically create a text input field in a vb.net aspx page, and embed it into a...
2
by: Steve | last post by:
This is a weird one. I have a series of "SmartParts" which are CAB (Composite Application Block) Views which are finally just UserControls (99% of the time) Anyway, I layout my UserControl in...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
1
by: Ken Jones | last post by:
Hi all, I am new to VB.NET and would like to get some help. I have a VB.NET Windows application that connects to my development SQLServer during development. I use the VS 2005 designer to...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
0
by: Don Barton | last post by:
I have MS Access 2003 and recently downloaded the MS Access 2007 Runtime and installed it to see what it was like. When I opened up my Access 2003 mdb, it was in 2007 Runtime environment!!! I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.