[PyKDE] trouble with QLabel
Steven James Samuel Stapleton
stapleton at mps.ohio-state.edu
Mon Jan 8 02:52:02 GMT 2007
Hello, I'm new to PyQT and having some troubles trying to get an app to
work.
I created a class called "about" (see the about.py section at the end), to
create an about message when about/help -> about on the menu bar is clicked.
When I try to create the class (see "creation snippet"), I get an error:
app_about_popup = about()
FILE "E:\My Documents\VAR\APP\about.py", line 16, in __init__
""", self)
RuntimeError: Underlying C/C++ object has been deleted
What could cause this?
Thanks,
-Jim Stapleton
creation snippet
========================================
#About/Help options
app_about_popup = about()
app_about = about_menu.addAction("About this app", app_about_popup,
a.qt.SLOT("show()"))
========================================
about.py
========================================
import ui.qt_import as qt_import
from logistic.io.cio import *
test, qt = qt_import.verify_import()
if(not test):
printf("Error, unable to load PyQt libraries, bailing.\n")
exit()
class about(qt.QWidget):
def __init__(self):
l = qt.QLabel("""
This is the Species and Item generator for VAR.
This program is desiged to help create species and
items in the VAR system.
Written by S James S Stapleton
""", self)
l.setGeometry(5,5,290,160)
p = qt.QPushButton("OK", self)
p.setGeometry(5,165,290,30)
qt.QObject.connect(btn_quit, qt.SIGNAL("clicked()"), app,
qt.SLOT("hide()"))
self.resize(300,200)
========================================
More information about the PyQt
mailing list