[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] PyQt Tutorial: How to write reusable widgets (and a bug report)
From: "Roberto Alsina" <ralsina () kde ! org>
Date: 2004-03-28 19:34:19
Message-ID: 3488.200.69.193.205.1080502459.squirrel () linux ! netline ! com ! ar
[Download RAW message or body]
I just finished writing a short tutorial that explains how to write custom
widgets in PyQt that are easy to reuse on other applications. Hope you
like it!
http://www.pycs.net/lateral/stories/27.html
It does however, also work as test case for something that is (IMHO) a
bug, but may be very hard to fix.
If you define a custom widget for designer and implement it using PyQt,
any connection defined in designer to a slot in the python-based widget is
compiled by pyuic into this:
self.connect(self.pushButton1,SIGNAL("clicked()"),self.restEditor1,SLOT("render()"))
While it should be something like this:
self.connect(self.pushButton1,SIGNAL("clicked()"),self.restEditor1.render)
I don't think this is fixable because pyuic can't guess that
self.restEditor1 is python-based, but I hope the PyQt guys can surprise me
with a patch :-)
It's not terribly important, because you can use it just fine, you only
need to handle the connections on python-code, but it is a small problem.
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina@kde.org
(_Y_.)' ._ ) `._`. " -.-' KDE Developer (MFCH)
_..`-'_..-_/ /-'_.'
(l)-'' ((i).' ((!.' Buenos Aires - Argentina
Imminentizing the eschaton since 1971.
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic