Re: [PyKDE] Issue with QDialog and lifetime

2005-07-07 Thread Giovanni Bajo
lifetime issues will just have their code working with no leaks without thinking of this. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Issue with QDialog and lifetime

2005-07-07 Thread Giovanni Bajo
ssue every time they use a dialog and pick the correct behaviour for their code. Explicit is better than implicit, after all. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Problem with layout iterators

2005-07-09 Thread Giovanni Bajo
ython doesn't know its real type. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Problem with layout iterators

2005-07-10 Thread Giovanni Bajo
sition on using C++ RTTI instead of Qt metaobject stuff, which is available only for QObject? Of course I'm thinking of PyQt4. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Issue with QDialog and lifetime

2005-07-25 Thread Giovanni Bajo
return dlg.data() >>>return None >>> >>> and then proposed to hardcode the transfer() call within the %MethodCode >>> for >>> QDialog.exec_loop. I'll remember you that exec_loop is called only for >>> modal >>> dialogs, while

[PyKDE] Re: Memory leak & segfault with deleteLater

2005-08-16 Thread Giovanni Bajo
edge of the QObject semantics would be acceptable. Thanks anyway! -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Request for Testing

2005-08-19 Thread Giovanni Bajo
ause for some reason the custom event data > contains None instead of the expected tuple. > > We are using Windows XP, Qt 3.3.3. Works for me with the 20050810 snapshots, so it must have been broken in the very last snapshot. Giovanni Bajo

Re: [PyKDE] Request for Testing

2005-08-22 Thread Giovanni Bajo
ild PyQt. This breaks my code again... SIP snapshot-20050821 -> Broken SIP snapshot-20050817 -> OK -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Request for Testing

2005-08-22 Thread Giovanni Bajo
IP snapshot-20050821: Traceback (most recent call last): File "D:\Work\caligola3d\src\pyqtbug6.py", line 28, in ? assert wr() is None AssertionError Output with SIP snapshot-20050817: -- Giovanni Bajo #!/usr/bin/env python #-*- coding: utf-8 -*- import gc import weakref from

Re: [PyKDE] Request for Testing

2005-08-22 Thread Giovanni Bajo
Giovanni Bajo <[EMAIL PROTECTED]> wrote: >> Eventually produced... :) Attached to this mail. Followup: it could be reduced a little bit more. Attached again. -- Giovanni Bajo#!/usr/bin/env python #-*- coding: utf-8 -*- import gc import weakref from qt import * app = QApplication([

Re: [PyKDE] pyqt for python 2.2?

2005-08-22 Thread Giovanni Bajo
commercial user or not, so I can't help more than this. You'll have to google for a download link. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Request for Testing

2005-08-23 Thread Giovanni Bajo
r my application. FYI, I will be out for a week or so since tomorrow, so I might be a little slow at testing further changes. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] pykde segfaults

2005-09-06 Thread Giovanni Bajo
uot;) > > it won't segfault (doesn't appear to display everything the way you probably > intend - didn't troubleshoot that). Out of curiosity, couldn't this be checked to generate an Exception instead of a segfault? -- Giovanni Bajo

[PyKDE] configure.py and feature file

2005-09-07 Thread Giovanni Bajo
&& make install" to be sufficient. Instead, since it reuses the existing feature file, compilation may break. I am not sure saving a few seconds of compilation of mkfeatures.cpp is worth the building headaches. I reckon it'd be better if configure.py could do just that, and reconfigure e

Re: [PyKDE] configure.py and feature file

2005-09-07 Thread Giovanni Bajo
like a common ./configure: --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' Thanks! -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Does PyQt 3.15 work with Qt 3.3.5?

2005-09-07 Thread Giovanni Bajo
Huaicai Mo <[EMAIL PROTECTED]> wrote: >> I noticed that Qt 3.3.5 has been released with some bugs fix. I wonder does >> the new PyQt 3.15 supports Qt 3.3.5? It works for me. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.

Re: [PyKDE] ANN: SIP v4.3.1 Released

2005-09-11 Thread Giovanni Bajo
changes in this version? Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] QPointArray

2005-09-14 Thread Giovanni Bajo
entually, I tried a plain list of longs, and that worked. Of course, now it seems like the obvious way to me (eg. the most similar to what C++ does), but the documentation misguided me. Maybe it could use some clarification. -- Giovanni Bajo ___ Py

Re: [PyKDE] Can't compile PyQt 3.15

2005-09-19 Thread Giovanni Bajo
the error message says to send this /temp file to the support. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] None as a string argument

2005-09-20 Thread Giovanni Bajo
tp://mats.imk.fraunhofer.de/pipermail/pykde/2005-April/010108.html). Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Newbie question on QWidget.focusOutEvent

2005-09-23 Thread Giovanni Bajo
focus. If you check, QComboBox' focus policy is KeyFocus, so it only gets the focus through key presses, *not* mouse actions. If you want to change this, use setFocusPolicy(QWidget.StrongFocus) so that it can get the focus through either mouse or

[PyKDE] SIP and distutils

2005-10-11 Thread Giovanni Bajo
f SIP shipped with a more tight integration with distutils. I'd be happy to contirbute it (since I start needing it) if I could get some details on the right way of doing it. Anybody has previous experience on this? Phil, what do you suggest? -- Gio

Re: [PyKDE] SIP and distutils

2005-10-11 Thread Giovanni Bajo
x27;d be happy to provide enough integration that packages using SIP will be able to build with distutils. Later, we can switch SIP itself to use distutils, if we feel it's the right thing to do. For that, you'll have to release at least a development snapshot with this new build system

Re: [PyKDE] SIP and distutils

2005-10-11 Thread Giovanni Bajo
n the SIP package. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] sip-snapshot-20051011: compilation failure with MSVC

2005-10-12 Thread Giovanni Bajo
Compiling the latest SIP snapshot with MSVC gives this error: qtlib.c(723) : error C2143: syntax error : missing ';' before 'type' The problem is that in C it is invalid to declare a variable in the middle of a scope. -- Giovanni Bajo _

[PyKDE] segfault using hasattr on a wrappertype class

2005-10-13 Thread Giovanni Bajo
Hello, this snippet causes a segfault on my computer (using Python 2.4.2): >>> import sip >>> sip.SIP_VERSION_STR '4.3.1' >>> class Foo(object): ... __metaclass__ = sip.wrappertype ... >>> hasattr(Foo

Re: [PyKDE] PyQt C API

2005-10-18 Thread Giovanni Bajo
ts and uses PyQt. I'm failry positive that, even if your application is not well decoupled, you can still isolate the performance sensitive algorithms in functions which have nothing to do with PyQt. Giovanni Bajo ___ PyKDE mailing list

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-18 Thread Giovanni Bajo
ome cases. It doesn't happen that often anyway. Weird idea: maybe it would be possible to make it a configure-time option? Would that be too much of a burden to maintain? In that case, I'm +1 on making the automatic conversion the default. -- Giovanni Bajo

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-18 Thread Giovanni Bajo
Anyway, I noticed this strange behaviour: >>> import sip >>> isinstance(sip.wrapper, object) True >>> issubclass(sip.wrapper, object) True Dunno if it's related to the fix. -- Giovanni Bajo ___ PyKDE mailing listPyK

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-18 Thread Giovanni Bajo
gt; in dictionaries). This is an orthogonal issue, and I admit that it can get annoying pretty fast. There is a simple solution though: I have been meaning to suggest Phil to add an exception-raising __hash__ method to QString. Those who want to hash by identify can still do it explicitally (

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-18 Thread Giovanni Bajo
ring. There is nothing unexcepted in this. We're just speaking of adding an implicit conversion in the bindings of a language for which "explicit is better than implicit" is a motto. I'm just saying that we should think twice about it. -- Giovanni Bajo __

Re: [PyKDE] segfault using hasattr on a wrappertype class

2005-10-18 Thread Giovanni Bajo
s related to the fix. > > Why is it strange? It's uncommon for an object to both be an instance *and* a subclass of a given class. What other object in Python has the same property? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-18 Thread Giovanni Bajo
I can think of involves the XML parser in Qt (assuming Phil > decides to support it in PyQt). A very simple case which happens often in my software is displaying logs in a text widget. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.d

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-19 Thread Giovanni Bajo
use PyQt to see how "interactive" things can be arranged. Anyway, I'm not sure I have ever had issues with strings in these prototypes. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] sender() and PYSIGNALs

2005-10-19 Thread Giovanni Bajo
Hello, It appears that QObject::sender() returns None when called from a slot invoked through a PYSIGNAL. Is there a way to access the information also for PYSIGNALs? Would it be possible to modify sender() so that it works also for PYSIGNALs? -- Giovanni Bajo

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-19 Thread Giovanni Bajo
wraps Qt/PyQt with the goal to provide a more Pythonic API. If we're going down this road, we can as well totally remove any kind of Qt container and iterator, and substitute everything with Python concepts. I would probably like an additional PyQ

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-20 Thread Giovanni Bajo
to create and access the Qt classes. I'm just saying that the scope of PyQt shouldn't be too make a Python version of Qt: it should be to wrap Qt to Python. This string issue is of course very borderline, and I don't think it's inappropriate for PyQt to return Python strings

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-20 Thread Giovanni Bajo
still be built from the same codebase, with %Feature directives. I believe a Python-only implementation would be easier to work on. See also the mail by David Bobble with which I totally agree. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraun

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-20 Thread Giovanni Bajo
> interface (or C++) if it turns out to be a problem. > 3. The Pythonic wrapper can be done in Python rather than in the > binding layer. This means that it's easier for people to work on > it and customize its behaviour. > 4. T

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-21 Thread Giovanni Bajo
to adhere as much as possible to Qt, to not confuse existing Qt users and I think it's a noble goal. I also understand that this is not ideal for a Python-only programmer. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de h

Re: [PyKDE] QString in PyQt4 - Request for Comments

2005-10-21 Thread Giovanni Bajo
it's mostly about creating or accessing Qt objects in more pythonic way, not wrapping each and every object and each and every method. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Re: sender() and PYSIGNALs

2005-10-23 Thread Giovanni Bajo
at it works also for PYSIGNALs? > > Try tonight's snapshots (SIP and PyQt) - not heavily tested. I assume that the so-called PyQt4 snapshot also works for Qt 3? Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Bug in siputils.py (latest snapshot)

2005-10-24 Thread Giovanni Bajo
LAGS_WARN_ON -w34100 -w34189 because with the current code it doesn't find the space terminator so it believes that "QMAKE_CFLAGS_WARN_ON -w34100 -w34189" is the macro name. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Re: sender() and PYSIGNALs

2005-10-24 Thread Giovanni Bajo
t; also for PYSIGNALs? > > Try tonight's snapshots (SIP and PyQt) - not heavily tested. It works, thanks! -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] unicode two-way conversion

2005-10-25 Thread Giovanni Bajo
way too hard to get an unicode string out of a QString: self.user.data["achternaam"] = unicode(self.GAchternaam.text()) But Sebastian wanted a UTF-8 string, so calling .utf8() on the QString should be sufficient. -- Giovanni Bajo ___

Re: [PyKDE] Update on QStrings and PyQt4

2005-10-25 Thread Giovanni Bajo
t; isn't used for some reason. I don't know if other string operations have a > similar problem. Well, this is good news (especially if you're going to make a SIP/PyQt3 release with this feature), since it's very handy. As for the "in" operator, did you report this to the python-dev list? Maybe it's just a bug and can get fixed. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] unicode two-way conversion

2005-10-25 Thread Giovanni Bajo
em is that I'm not able to convert the QString to utf-8 (without > making it a str first, which bails out on UnicodeDecodeError. See attached > snippet. > > Any idea? Quickly skimming through QString docs reveals a utf8() method. Otherwise, you can call unicode

[PyKDE] SIP: difference between TransferBack and Factory

2005-10-25 Thread Giovanni Bajo
of before). My doubt is: why does SIP care whether the function just created the object, or got it from somewhere else, as long as the semantic is that Python will own the object after the call? Why should it care whether it already seen it as a Python object or not? Can anybody elaborate a little?

[PyKDE] [PATCH] Compiling SIP with distutils

2005-10-26 Thread Giovanni Bajo
the right sip executable, even under Linux. Suggestions? Comments? I tried basic usage under Windows and Linux and it works. Can we this included in future SIP versions? I think people will be delighted to use distutils to build their SIP-based extensions. -- Giovanni Bajo # Subclasses disutils.c

Re: [PyKDE] [PATCH] Compiling SIP with distutils

2005-10-27 Thread Giovanni Bajo
of SIP as a general wrapping tool. > Any chance of some documentation? Within sipref.txt? Sure, I can write something if you agree on getting this included. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] [PATCH] Compiling SIP with distutils

2005-10-27 Thread Giovanni Bajo
utils.py which uses sipconfig to find out the name of the SIP executable. You'll still need to make sure sipdistutils.py is installed when SIP is installed. Please, let me know when it gets in. Thanks! -- Giovanni Bajo # Subclasses disutils.command.build_ext, # replacing it with a SIP versi

[PyKDE] Method wrappers not shared

2005-10-28 Thread Giovanni Bajo
Ewww. Another fix which would be good for me would be to have the __module__ attribute defined for methods. Probably easier to implement than reusing method objects? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Documentation

2005-11-02 Thread Giovanni Bajo
PyQt is just a wrapper around it, so all the function names and arguments will be (mostly) the same. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] transerfBack in QPopupMenu.exec?

2005-11-29 Thread Giovanni Bajo
ialog. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] PyQt / sipdistutils

2005-11-30 Thread Giovanni Bajo
ip/qt/versions.sip:30: Exactly one of this %Timeline > must be specified with the -t flag > > The -t flag is present (and shown on the screen). What's the exact value (repr) of pqconfig.pyqt_qt_sip_flags? How did your modified self.spawn() call look like? -- Giovann

Re: [PyKDE] PyQt / sipdistutils

2005-11-30 Thread Giovanni Bajo
VendorID -t WS_X11 -t Qt_3_3_0 If this is a single string, it looks like you need to split it, as spawn() accepts separate strings for each parameter. Something like this might work: self.spawn([sip_bin, "-c", self.build_temp, "-b&quo

Re: [PyKDE] PyQt4 Update

2005-12-04 Thread Giovanni Bajo
Or maybe adding support to SIP for automatic conversion could be done. I understand it mustn't be easy though! Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Cannot derive QValidator

2005-12-06 Thread Giovanni Bajo
() app.setMainWidget(cb) qApp.exec_loop() === any time I press a key, I see: TypeError: invalid result type from V.validate() This is with PyQt 3.15, SIP 4.3.1. -- Giovanni Bajo

Re: [PyKDE] Cannot derive QValidator

2005-12-06 Thread Giovanni Bajo
Phil Thompson <[EMAIL PROTECTED]> wrote: > The Python signature is different to the C++ signature - check the > documentation. Argh, sorry! ;) -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.f

Re: [PyKDE] Deployment on Windows? > license compatible

2005-12-07 Thread Giovanni Bajo
;t work because of weird ABI issues. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] sipdistutils: setup include paths

2005-12-15 Thread Giovanni Bajo
ard Python path, which might or might not be the one matching sipconfig. This patch fixes the problem. May you apply it for the next snapshot? -- Giovanni Bajo diff -c -p -F^def -r1.1 sipdistutils.py *** sip-snapshot-20051130/sipdistutils.py 14 Dec 2005 18:44:02 - 1.1 --- sip-sn

[PyKDE] Bug in PyQt/SIP snapshot

2005-12-16 Thread Giovanni Bajo
Phil, with PyQt snapshot-20051201, SIP snapshot-20051130: >>> import qt >>> s = qt.QString('foobar') >>> s == None segfault -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] PyQt4 logic in PyQt3's configure.py

2005-12-16 Thread Giovanni Bajo
t; in the path and just use the QTDIR env, and it works correctly. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Bug in PyQt/SIP snapshot

2005-12-16 Thread Giovanni Bajo
Douglas Soares de Andrade <[EMAIL PROTECTED]> wrote: > With pyqt snapshot 20051208-1 and sip snapshot 20051212 im not having this > error. Ah thanks, I'll try and upgrade. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.f

[PyKDE] Building SIP with distutils

2005-12-16 Thread Giovanni Bajo
's the last step though, I wanted to make sure that everything else is OK. Phil, I'd appreciate if you (or others) could give this a go and confirm that it mostly works. I'll add support for generation of sipconfig.py in the next few days. -- Giovanni Bajo #!/usr/bin/env pytho

Re: [PyKDE] Bug in PyQt/SIP snapshot

2005-12-16 Thread Giovanni Bajo
Giovanni Bajo <[EMAIL PROTECTED]> wrote: >> With pyqt snapshot 20051208-1 and sip snapshot 20051212 im not having this >> error. > > Ah thanks, I'll try and upgrade. Argh, it didn't work out. I'm trying with snapshot-20051212 and PyQt snapshot-20051212,

Re: [PyKDE] Bug in PyQt/SIP snapshot

2005-12-16 Thread Giovanni Bajo
Douglas Soares de Andrade <[EMAIL PROTECTED]> wrote: > Can you send me the example code that is broking with you ? So i can test > it. It's PyQt compilation that it's broken for me! -- Giovanni Bajo ___ PyKDE

Re: [PyKDE] Bug in PyQt/SIP snapshot

2005-12-16 Thread Giovanni Bajo
Giovanni Bajo <[EMAIL PROTECTED]> wrote: > Argh, it didn't work out. I'm trying with snapshot-20051212 and PyQt > snapshot-20051212, and I get this: > > sipqtpart0.obj : error LNK2019: unresolved external symbol > "__declspec(dllimport) public: virtual class

Re: [PyKDE] Problems with PyQt snapshot 20051218

2005-12-19 Thread Giovanni Bajo
; [EMAIL PROTECTED] PyQt-x11-gpl-snapshot-20051218]$ c++filt > _ZN7QLayout8iteratorEv > QLayout::iterator() > [EMAIL PROTECTED] PyQt-x11-gpl-snapshot-20051218]$ > > Any ideas ? Looks related to this: http://mats.imk.fraunhofer.de/pipermail/pykde/2005-De

Re: [PyKDE] Using QFileDialog

2006-01-09 Thread Giovanni Bajo
self.pushButton1.setText("aa") > } > -- > 1. how can I make it work? > 2. how can I get the selected filename and display its name as > pushButton1 text? Will something like: SLOT("test2(a.selectedFile())") > work? > I&#x

Re: [PyKDE] PyQt4 GPL for Windows Binary Available

2006-01-12 Thread Giovanni Bajo
> PyQt4 binary and avoid the 40M Qt download. Is this compatible with a bulk Python 2.4, or do we need a MinGW-compiled Python? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] PyQt4 GPL for Windows Binary Available

2006-01-12 Thread Giovanni Bajo
ht be nice if > website pages that point out the need to compile Python with MinGW were > updated to reflect the fact that that is no longer required with Python > 2.4 (and might not be for 2.3.5, either, though I haven't checked). I don't r

Re: [PyKDE] PyQt4 GPL for Windows Binary Available

2006-01-12 Thread Giovanni Bajo
t4's build system will support MSVC for the benefit of the commercial version of Qt, will it be possibile to build also PyQt4 GPL version with MSVC? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Support for PyOS_InputHook?

2006-01-14 Thread Giovanni Bajo
Phil, I just learnt of PyOS_InputHook, which is the way that TkInter manages to work from the command line interpreter without needing an explicit event loop. I was thinking it would be great for prototyping if PyQt had this feature too... -- Giovanni Bajo

Re: [PyKDE] Using UI files in your app with PyQt4

2006-01-22 Thread Giovanni Bajo
t;> Python code widget_module = compile(code_string.getvalue(), >> filename, "exec") exec widget_module >> return locals()[widget_info["uiclass"]] This ought to be included within PyQt4.uic! Giovanni Bajo ___ Py

Re: [PyKDE] Auto-connecting Slots

2006-01-27 Thread Giovanni Bajo
cating the whole signal name really stems out as unpythonic. Listing the arguments type could be well enough: @qtsignature("int") def on_spinbox_valueChanged(self, value): # Actually, you might even use the corresponding Python it instead of a string: @qtsignature(int, QString

Re: [PyKDE] Auto-connecting Slots

2006-01-28 Thread Giovanni Bajo
gt; I can't think of a real-world use case for this - but that's your > job, not mine. > > What I can do is to make the function name optional in the signature, > so you can use the short version most of the time but you can still > have the flexibility of the above. OK, fine by me as long as the repetition isn't necessary (and the decoration isn't necessary if not for disambiguation). Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Auto-connecting Slots

2006-01-28 Thread Giovanni Bajo
gnature" within their OpenGL.GL module. So, to repeat, I'm not trying to make everyone change their coding styles or something. Everybody has its rights to decide how to use PyQt. But surely, I don't expect PyQt to add new names to its modules which are in contrast with this convention, and make life harder to those who prefer to use plain Q* names. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Auto-connecting Slots

2006-01-28 Thread Giovanni Bajo
rolltech's convention. QtCore.qSignature would surely be better (there are >> pre cedence of global functions named qFooBar in Qt's API). > > Trolltech are much more likely to add a function called qSignature() than > one called signature(). Isn't calling it pyqtSignature

Re: [PyKDE] Auto-connecting Slots

2006-01-28 Thread Giovanni Bajo
m mostly using QtCore. instead of from QtCore > import *, only classes I need really frequently are importet into the > current namespace (from QtCore import QString for example). Fine. I would hate code which is not consistent with itself like you'

Re: [PyKDE] Auto-connecting Slots

2006-01-28 Thread Giovanni Bajo
blindly use them as namespaces even when not necessary. Again, I have *never* seen Python code using PyOpenGL with the module as a namespace (GL.glBegin), so I just can't see why it should be any different for Qt. Giovanni Bajo

Re: [PyKDE] Auto-connecting Slots

2006-01-29 Thread Giovanni Bajo
seen a single public release. I don't have a recent PyQt4 snapshot around, can you post a list of those names? Some could be skipped when using the star import (using __all__). It pretty much depends on what they are. hex() and oct() looks like another serious problem that needs a solution, to me. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Auto-connecting Slots

2006-01-29 Thread Giovanni Bajo
gt; > [...] > > to: > > import wx > button = wx.Button(...) In fact, I'd be *perfectly* fine with Q.String, Q.Widget and Q.Label (from PyQt4 import QtCore as Q). What I deeply dislike is the verbose QtCore.QWidget. Giovanni Bajo ___

Re: [PyKDE] Auto-connecting Slots

2006-01-29 Thread Giovanni Bajo
mport QtCore as Q). What I deeply dislike is the >> verbose QtCore.QWidget. > > I agree, although my preference would be qt.String, qt.Widget, etc. That too, though I prefer Q. as it's more similar to the C++ counterpart. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Auto-connecting Slots

2006-01-30 Thread Giovanni Bajo
Jesper Anderson <[EMAIL PROTECTED]> wrote: > and when you want to avoid typing pyqtSignature: > > from PyQt4.QtCore import * > from PyQt4.QtCore import pyqtSignature as signature Sure, or more simply: signature = pyqtSignature

[PyKDE] Signal destroyed() not emitted for QWidget

2006-02-14 Thread Giovanni Bajo
uggestions to achieve this, that'd be pretty. My idea was to use the destroyed() signal to find out when the QObject was destroyed and invalidate the reference. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] Re: Signal destroyed() not emitted for QWidget

2006-02-14 Thread Giovanni Bajo
nnects to the sender's destroyed() signal so > that it can call deleteLater() on itself - then it seems to behave as you > were expecting. > > I'll probably make a change in the next snapshot or so. Thanks. But why does it work for QObject and not for QWidget? -- Giova

[PyKDE] Auto-disconnection of signals broken?

2006-02-14 Thread Giovanni Bajo
9.py", line 17, in ? o.emit(PYSIGNAL("FOO"), ()) RuntimeError: underlying C/C++ object has been deleted Shouldn't the signal be automatically disconnected when the widget dies? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Re: Signal destroyed() not emitted for QWidget

2006-02-14 Thread Giovanni Bajo
x27;s dtor does emit destroyed() and then deletes its children. But QWidget's dtor also deletes its children (before doing the actual platform-dependent destruction), so when the QObject dtor for the QWidget is invoked, the proxy is gone and the signal is not forwarded. -- Giovanni Bajo ___

Re: [PyKDE] Dropping SIGNAL() and SLOT() in PyQt4?

2006-02-19 Thread Giovanni Bajo
of a cultural change? > (Of course they could also be made optional.) I'm fine with dropping them as long as they're optional. Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] textChanged()

2006-02-22 Thread Giovanni Bajo
self.connect(self.mainTextWindow, SIGNAL("textChaged()"), self.doTest) > > Didn't work ('mainTextWindow' is my textEdit widget), so I googled for [...] > > Is it just a typo? 'Chaged'? > Just a quick guess! In f

Re: [PyKDE] textChanged()

2006-02-22 Thread Giovanni Bajo
self-contained example that demonstrates the problem. This single line isn't sufficient to help you out. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Memory leak with QDialog

2006-02-28 Thread Giovanni Bajo
t;> >> The attached Python example demonstrates this. >> >> If there is a better solution, let me know. > > You don't say what versions you are using. I think this was fixed in > v3.15 - at least I don't see any leak in current snapshots. Yes, I can confirm

Re: [PyKDE] How to contribute to sip ?

2006-02-28 Thread Giovanni Bajo
(which ignore comments in source files and whatnot). So, why can't you configure your build system so that it doesn't call SIP in the first place if the header file has not changed? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] How to contribute to sip ?

2006-02-28 Thread Giovanni Bajo
a "choke point". I think being time-stamp > friendly is a way for SIP to compensate for this. I see. Can't you call SIP once for each .sip file, and make it generate one class at a time? Isn't that what %Import is for? -- Giovanni Bajo _

Re: [PyKDE] How to contribute to sip ?

2006-02-28 Thread Giovanni Bajo
rsion and takes like 20 minutes to compile it, while I can compile PyQt3 single-file with MSVC in roughly 100 seconds. Are you saying that this scenario is going to change with PyQt4? -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fra

Re: [PyKDE] How to contribute to sip ?

2006-02-28 Thread Giovanni Bajo
ich exponentially slowed down compilation of PyKDE (so I suppose it's SIP-related), but that was fixed in gcc 4.0.3. Even with that patch, I still hit 512Mb memory limit, the computer starts swapping and compilation times go too high. -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
-- from PyQt4.QtCore import * from PyQt4.QtGui import * dir(Qt) --- won't show the full Qt namespace, thus making PyQt4 unusable without the annoying QtCore/QtGui prefix in front of everything? -- Giovanni Bajo ___

[PyKDE] Static compilation of PyQt

2006-03-02 Thread Giovanni Bajo
is detected. BTW, for PyQt3, the steps are really easy: 1) Compile Qt statically (produce qt-mt.lib) 2) Merge all the modules of PyQt you're interested in into qtmod.sip (you *must* build only qt.pyd). 3) Build qt.pyd only. I have a Python script which does the module mergin

Re: [PyKDE] QtCore.Qt and QtGui.Qt

2006-03-02 Thread Giovanni Bajo
ey find it useful, as long as PyQt official supports the star-import alternative syntax. > and which > is slated for removal in a future version of Python. It must be a *very* future version of Python, since its removal is not even mentioned in PEP 3000. > That said I can see lots of bug rep

<    1   2   3   4   5   6   7   >