Re: [PyKDE] Python functions as slots
Hi Konrad, just leave out the receiver object: app.connect(button, SIGNAL("clicked()"), foo) > I have lots of problems using Python functions as slots. As a simple > illustration, take the following code (an example from Boudewijn Rempt's > excellent book with an added connect): > >import sys >from qt import * > >def foo(*args): >print args > >app=QApplication(sys.argv) >button=QPushButton("Hello World", None) >app.setMainWidget(button) >button.show() >app.connect(button, SIGNAL("clicked()"), app, foo) >app.exec_loop() ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] QMessageBox and Qt3
That is expected: in Qt 2.x, a modal dialog would silently call exec() on show(), in Qt 3.0, this does no longer happen (which is a documented change). Doing an mb.exec_loop() instead of mb.show() should fix it. Regards, Soeren > My program crashed without any error messages and after some investigation I > could isolate the problem. These few lines work fine on Mandrake 8.2 with > PyQt 3.1 and Qt 2.3.1 but on Redhat 7.3 with Qt 3.0.3, PyQt 3.2.4 and Python > 2.2 it just crashes. > > import sys > from qt import * > > a = QApplication(sys.argv) > > mb = QMessageBox("Warning", "text", QMessageBox.Warning, QMessageBox.Yes, > QMessageBox.No , QMessageBox.Cancel) > mb.show() ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] manuals/books/how-to's
> On 10 Feb 2002, Maarten Stolte wrote: > Thanks alot, and how about the book that was supposed to come out? You mean the PyQt book by Boudewijn Rempt? That can be found here: http://stage.linuxports.com/projects/pyqt/ The official Qt Documentation that was supposed to be released last year will not appear in printed form, but it is part of the Qt online docs (just print the pdf version (ftp://ftp.trolltech.com/qt/pdf/3.0/) if you want something on paper :). - Soeren ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Newbie questions ...
Hi Oliver, the indentation of "slotFile" looks incorrect to me. You define that function inside the __init__ function, not in the class block. Or, if you want it defined there, do not use "self" with slotFile (because it is not a class member function then). - Soeren > class MyWidget(QWidget): > def __init__(self,parent=None,name=None): >def slotFile(self): > #do something ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] Site down?
Isn't this the official site now: http://www.thekompany.com/projects/pykde/ Regards, Soeren > > Hi: > > I'm trying to download the sip and pyqt tgz's from > www.river-bank.demon.co.uk but the site seems to be down. Is there any > alternative site? > > Thanks, > > -- > VĂctor R. Ruiz > [EMAIL PROTECTED] ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] again problem about LineEdit(thanks for Hollis)
> a=self.LineEdit1.text() > b="bbs.tsinghua.edu.cn" > print a==b > ## the result is 0 ,that means a is not equal to b ,how > #can I make my intention into reality Note that "a" is a reference to a QString object, not a Python string. The following should work as expected: print str(a)==b -- Soeren ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde