Hi.

I get the following error

Traceback (most recent call last):
  File "preview.py", line 19, in ?
    fd.setContentsPreview (w, p)
RuntimeError: underlying C/C++ object has been deleted

when calling the script below.
I'm completely lost with that. Any suggestions?

Thanks, Martin.


from qt import *

class preview (QFilePreview):
    def __init__ (self, widget):
        self.widget = widget
    def previewUrl (self, url):
        print url
        self.widget.setText ('Hi')

app = QApplication ([])
fd = QFileDialog ()
w = QLabel (None) 
p = preview (w)
fd.setContentsPreviewEnabled (True)
fd.setContentsPreview (w, p)
fd.setPreviewMode (QFileDialog.Contents)
fd.show ()
QObject.connect (app, SIGNAL ('lastWindowClosed ()'), app, SLOT ('quit ()'))
app.exec_loop ()

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to