[PyKDE] Re: Memory leak segfault with deleteLater
Phil Thompson [EMAIL PROTECTED] wrote: Should be fixed in tonight's SIP snapshot. The cyclic garbage collector was ignoring the extra reference to wrappers of objects owned by C++. Thanks, I just verified that this fixes my problem! -- Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Windows systray application
Hi, I've been hunting for two days now a way to create an application with PyQT (on winXP), that will hide itself on systray. only things I found was some references to WM_ messages and winEventFilters.. but no real example what that means. and some references on QT examples of icontray-program.. but that was outdated, and I couldn't make it work in python.. so, is there anyone that has managed to do this? and how? all information highly appreciated. thanks. .b ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] lineedit on focus
Hi guys! Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? thanx danu ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] lineedit on focus
Danu Kusmana wrote: Hi guys! Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? I do not think there is a signal but you could use an eventfilter on the widget and look for focus out. thanx danu ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde -- Andrew Bushnell Lead Development Engineer Fluent Inc. 10 Cavendish Court Centerra Resource Park Lebanon, NH 03766 [EMAIL PROTECTED] Phone: 603-643-2600, ext. 757 Fax: 603-643-1721 www.fluent.com ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] eric3 - unfold class fields
Am Sunday, 26. June 2005 16:03 schrieb alex rait: At last I managed to install eric3 and it works ok. Now I have some question about the editor - Is there a way to unfold the class fields(methods, instance variables) when I enter . for instance? This is the way I do it in Eclipse with java or visual studio/kdevelop with c++. The only thing I could find so far is the autocomplete feature, but it is not what I want... Is there any solution to it? No. This is generally not doable for a dynamic typed language like python. Of course if you'd use eric for C/Java development, one could make this work - but that would be a major effort. Diez ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] lineedit on focus
Danu Kusmana [EMAIL PROTECTED] wrote: Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? Just reimplemet focusInEvent(). In the QFocusEvent you receive there is also a reason() method which tells you how the widget got the focus (in case you want to do something only if it got focus by mouse). Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] lineedit on focus
I set the input mask with: self.EntryUmur.setInputMask(99) then I want that when user click on the line edit the cursor prosition on 0, but it never happened. I tried: self.EntryUmur.focusInEvent(self.test()) def test(self): self.EntryUmur.setCursorPosition(0) but this method is not general for other line edit. I dont get it how to reimplement the event filter :P Can anyone help? danu On Tue, 2005-06-28 at 14:21 +0200, Giovanni Bajo wrote: Danu Kusmana [EMAIL PROTECTED] wrote: Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? Just reimplemet focusInEvent(). In the QFocusEvent you receive there is also a reason() method which tells you how the widget got the focus (in case you want to do something only if it got focus by mouse). Giovanni Bajo ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] lineedit on focus
On Tue, 2005-06-28 at 14:21 +0200, Giovanni Bajo wrote: Danu Kusmana [EMAIL PROTECTED] wrote: Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? Just reimplemet focusInEvent(). In the QFocusEvent you receive there is also a reason() method which tells you how the widget got the focus (in case you want to do something only if it got focus by mouse). On Sunday 26 January 2003 14:10, Danu Kusmana wrote: I set the input mask with: self.EntryUmur.setInputMask(99) then I want that when user click on the line edit the cursor prosition on 0, but it never happened. I tried: self.EntryUmur.focusInEvent(self.test()) def test(self): self.EntryUmur.setCursorPosition(0) but this method is not general for other line edit. I dont get it how to reimplement the event filter :P You can subclass the QLineEdit and then overload the focusInEvent method. See attached script for an example of how to do this. Cheers, -- sebas http://vizZzion.org | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I have no right, by anything I do or say, to demean a human being in his own eyes. What matters is not what I think of him; it is what he thinks of himself. To undermine a man's self-respect is a sin. - Antoine de Saint-Exupery pgpSg09sBBOwr.pgp Description: PGP signature line.py Description: application/python ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] Windows systray application
On Tue, 2005-06-28 at 14:11 +0300, basse wrote: Hi, I've been hunting for two days now a way to create an application with PyQT (on winXP), that will hide itself on systray. only things I found was some references to WM_ messages and winEventFilters.. but no real example what that means. AFAIK, QT doesn't currently have a class that allows this. You will need to use the win32api call SHELL_NOTIFYICON to create the icon, and then I used the winEvent (I think, it's been about 2 years) to capture the incoming WM_ messages. and some references on QT examples of icontray-program.. but that was outdated, and I couldn't make it work in python.. so, is there anyone that has managed to do this? and how? Yes, I have. Unfortunately the code was developed for a company I no longer work for. Otherwise, I would share. There is a pure win32 example here. The main changes are 1) create a hidden widget, and make that the parent of the notify icon. (The parent gets the events you are interested in.) Then override, winEvent (I'm 60% sure that is the name, I'm sure someone else (who has used QT more recently than I ) would remember the correct one). In that event handler examine the LPARAM(again, I think) and compare to the WM_ constants you found. This is a brief overview, but it should get you started, sorry I can't be more help. all information highly appreciated. thanks. .b ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde -- --- Rob Myddrin Knapp [EMAIL PROTECTED] http://www.myddrin.com ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] overloading events with qt designer and pyqt
Hi, being new to pyqt and qt designer, i don't know how to overload eg. the paintEvent of a QFrame. While being no problem doing it 'by hand' is there a possibility to enter the glue code within qt designer? sweating greets, Frank ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Eric on PowerMac and Fedora Core 4 - OK
Hello! Finally I have had success running the latest snapshoot of eric on Fedora Core 4. The steps were: a) Download QScintilla, stable relase. b) Compile and install it. c) Download PyQt, stable release d) Compile and install it. e) run ldconfig f) Install eric Everything seems work fine now, just minor problems with CVS but I don't know if they are eric related or configuration related. Best regards, -- Antoni Aloy López Binissalem - Mallorca Soci de Bulma # 34 ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] overloading events with qt designer and pyqt
On Tuesday 28 June 2005 20:12, Frank Stüss wrote: being new to pyqt and qt designer, i don't know how to overload eg. the paintEvent of a QFrame. While being no problem doing it 'by hand' is there a possibility to enter the glue code within qt designer? I'm not sure if that's really what you want, but if you'd like to use qt-designer and hand-coded additions at the same time, you can create your UI / widgets using qt-designer and then subclassing that UI in another file and overload the (paint)event. That way you can still change the UI without having to re-merge your changes everytime you recompile the .ui files. sweating greets, :-) -- sebas http://vizZzion.org | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - It is necessary for the welfare of society that genius should be privileged to utter sedition, to blaspheme, to outrage good taste, to corrupt the youthful mind, and generally to scandalize one's uncles. - George Bernard Shaw pgpYQhzQR2gJ9.pgp Description: PGP signature ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] overloading events with qt designer and pyqt
I'm not sure if that's really what you want, but if you'd like to use qt-designer and hand-coded additions at the same time, you can create your UI / widgets using qt-designer and then subclassing that UI in another file and overload the (paint)event. That way you can still change the UI without having to re-merge your changes everytime you recompile the .ui files. Thanks. Got it. But what if i don't want to overload the overall paintEvent of the UI but only the one of a part of it, eg. a QFrame or a QHbox? Shure I would subclass QFrame and overload the event but how can I put it into the 'designed' code, since my UI still uses QFrame and not the subclass of it. I like to do some simple drawLines on a QFrame not using any extension packages, only what is shipped with QT and pyqt. Thanks again for any help. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] overloading events with qt designer and pyqt
On Tuesday 28 June 2005 20:50, Frank Stüss wrote: I'm not sure if that's really what you want, but if you'd like to use qt-designer and hand-coded additions at the same time, you can create your UI / widgets using qt-designer and then subclassing that UI in another file and overload the (paint)event. That way you can still change the UI without having to re-merge your changes everytime you recompile the .ui files. Thanks. Got it. But what if i don't want to overload the overall paintEvent of the UI but only the one of a part of it, eg. a QFrame or a QHbox? Shure I would subclass QFrame and overload the event but how can I put it into the 'designed' code, since my UI still uses QFrame and not the subclass of it. I like to do some simple drawLines on a QFrame not using any extension packages, only what is shipped with QT and pyqt. That would involve adding custom widgets to qt-designer, I'm not sure if this is supported (yet?). Of course you could use a more hacky solution, like replacing the QFrame in your subclass, but that's ugly. Thanks again for any help. -- sebas http://vizZzion.org | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Do you know the difference between education and experience? Education is what you get when you read the fine print; experience is what you get when you don't. - Pete Seeger pgpZr8XpebEWJ.pgp Description: PGP signature ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] dcop call always returns same value
On Monday 27 June 2005 06:07, Sebastian Kügler wrote: Hi, While trying to interface the Kdesktop ScreensaverIface, I noticed an odd behaviour. If called via bash or kdcop, $ dcop kdesktop KScreensaverIface isEnabled would return the correct value, i.e. true or false whether I have checked [ ] Start automatically in kcmshell screensaver. Interfacing it via python, it _always_ returns True, which to me seems a bug, but I may be doing something completely wrong ... Sample Script: # - # Following _always_ returns True :( is_enabled = kdesktop.KScreensaverIface.isEnabled()[0] Any ideas what's going wrong here? The call returns a tuple, and the [0] element just indicates if the call succeeded or not - since it's succeeding, it returns True every time. The [1] element should be the result data, however that's returning 'None' at the moment, so the call still isn't working correctly. I'm looking at it and will let you know. Jim ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] dcop call always returns same value - UPDATE
On Monday 27 June 2005 06:07, Sebastian Kügler wrote: Hi, While trying to interface the Kdesktop ScreensaverIface, I noticed an odd behaviour. If called via bash or kdcop, $ dcop kdesktop KScreensaverIface isEnabled would return the correct value, i.e. true or false whether I have checked [ ] Start automatically in kcmshell screensaver. Interfacing it via python, it _always_ returns True, which to me seems a bug, but I may be doing something completely wrong ... Sample Script: # - # Following _always_ returns True :( is_enabled = kdesktop.KScreensaverIface.isEnabled()[0] Any ideas what's going wrong here? The call returns a tuple, and the [0] element just indicates if the call succeeded or not - since it's succeeding, it returns True every time. The [1] element should be the result data, however that's returning 'None' at the moment, so the call still isn't working correctly. I'm looking at it and will let you know. UPDATE: handling for the 'bool' type wasn't implemented in PyKDE. I have a snapshot just about ready to go and will add the type before posting it. Should be available in a day or two. Jim ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] overloading events with qt designer and pyqt
On 28.Jun 2005 - 21:55:30, Sebastian Kügler wrote: That would involve adding custom widgets to qt-designer, I'm not sure if this is supported (yet?). You mean in the context of pyqt? Because qt-designer itself should support it, there is even a tutorial how to do that in the qt-docs (IIRC). Andreas -- You will inherit millions of dollars. ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] New PyKDE snapshot20050628
I've just sent a new snapshot to Phil, and it should appear shortly on the riverbankcomputing site in the directory http://www.river-bank.demon.co.uk/download/snapshots/PyKDE/ The latest sip snapshot this was tested against was the 06/05 snapshot. I haven't done a lot of testing with this, so please test and report any problems. This snapshot still requires gcc3.3. This includes a fix to allow DCOP under PyKDE to handle bool types as return values. Jim ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] overloading events with qt designer and pyqt
On Tuesday 28 June 2005 23:13, Andreas Pakulat wrote: On 28.Jun 2005 - 21:55:30, Sebastian Kügler wrote: That would involve adding custom widgets to qt-designer, I'm not sure if this is supported (yet?). You mean in the context of pyqt? Because qt-designer itself should support it, there is even a tutorial how to do that in the qt-docs (IIRC). Yes, I meant custom PyQt widgets, but thanks anyway. -- sebas http://www.kde.nl | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. - Benjamin Franklin, 1759 pgpd75IAWOj45.pgp Description: PGP signature ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] dcop call always returns same value - UPDATE
On Tuesday 28 June 2005 22:31, Jim Bublitz wrote: On Monday 27 June 2005 06:07, Sebastian Kügler wrote: # Following _always_ returns True :( is_enabled = kdesktop.KScreensaverIface.isEnabled()[0] Any ideas what's going wrong here? The call returns a tuple, and the [0] element just indicates if the call succeeded or not - since it's succeeding, it returns True every time. The [1] element should be the result data, however that's returning 'None' at the moment, so the call still isn't working correctly. I'm looking at it and will let you know. UPDATE: handling for the 'bool' type wasn't implemented in PyKDE. I have a snapshot just about ready to go and will add the type before posting it. Should be available in a day or two. Thanks, I'll give it a go and report back. -- sebas http://www.kde.nl | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had. - Linus Torvalds pgphI5ZiJkM3q.pgp Description: PGP signature ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: PyKDE Extensions 0.3.0 released
Hi Simon, On Thursday 23 June 2005 19:25, Simon Edwards wrote: Version 0.3.0 is now available for public testing. * Wednesday June 21st 2005 Simon Edwards [EMAIL PROTECTED] - 0.3 release. Development version. - 64bit awareness when building libraries added. - Files for installation in the program's KDE application data directory are now specified with the 'application_data' parameter for setup(). - kde-prefix option added to setup.py scripts. http://www.simonzone.com/software/pykdeextensions/ Feedback and bug reports welcome. Works good, except for one problem symlinking the files. symlinking /usr/bin/serviceconfig - /usr/serviceconfig.py symlinking /usr/bin/userconfig - /usr/userconfig.py symlinking /usr/bin/mountconfig - /usr/mountconfig.py symlinking /usr/bin/displayconfig - /usr/displayconfig.py which should probably point to /usr/share/apps/$SOMETHING Attached patch makes that work for me (tm), although I'm unsure if that is the right way (tm). Thanks for the otherwise really appreciated tools. Cheers, -- sebas http://www.kde.nl | GPG Key ID: 9119 0EF9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had. - Linus Torvalds pgp8HoDPGY9Ud.pgp Description: PGP signature --- kdedistutils.py.orig 2005-06-29 02:04:32.631299584 +0200 +++ kdedistutils.py 2005-06-29 02:05:17.153531176 +0200 @@ -377,7 +377,7 @@ if self.distribution.executable_links is not None: for link in self.distribution.executable_links: symname = os.path.join(install_script_cmd.install_dir,link[0]) -target = os.path.join(destination_dir,link[1]) +target = os.path.join(destination_dir,'share/apps',self.distribution.metadata.name,link[1]) log.info(symlinking %s - %s, symname, target) if not self.dry_run: if os.path.islink(symname): ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[PyKDE] Qt 4 and python
Hi, Will pyqt work with Qt4 in windows as well? I'm hoping I can develop open source cross platform python/qt apps now that this has been released. Mark ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] lineedit on focus + setCursorPosition(0)
The focusInEvent is working but the cursor position didn't change the way I wanted. how come? #**classEntry.py** import sys from qt import * class classEntry(QLineEdit): def focusInEvent(self, event): self.setText(999) self.setCursorPosition(0) #**SkorKardioJakarta.py** import sys from qt import * from classEntry import classEntry self.EntryTinggiBadan = classEntry(self.centralWidget(), EntryTinggiBadan) self.EntryTinggiBadan.setSizePolicy(QSizePolicy(0,0,0,0, self.EntryTinggiBadan.sizePolicy().hasHeightForWidth())) self.EntryTinggiBadan.setInputMask(999) thanx danu On Tue, 2005-06-28 at 16:21 +0200, Sebastian Kügler wrote: On Tue, 2005-06-28 at 14:21 +0200, Giovanni Bajo wrote: Danu Kusmana [EMAIL PROTECTED] wrote: Im m trying to find something todo with QLineEdit object when the object recived focus by clicking on it. There aren't any signal like on focus for QLineEdit or is there? Just reimplemet focusInEvent(). In the QFocusEvent you receive there is also a reason() method which tells you how the widget got the focus (in case you want to do something only if it got focus by mouse). On Sunday 26 January 2003 14:10, Danu Kusmana wrote: I set the input mask with: self.EntryUmur.setInputMask(99) then I want that when user click on the line edit the cursor prosition on 0, but it never happened. I tried: self.EntryUmur.focusInEvent(self.test()) def test(self): self.EntryUmur.setCursorPosition(0) but this method is not general for other line edit. I dont get it how to reimplement the event filter :P You can subclass the QLineEdit and then overload the focusInEvent method. See attached script for an example of how to do this. Cheers, ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde