Re: [PyKDE] Aligning Text in a Table
Hi, Thanks for your response. I got lost trying to follow your idea. In the past I have subclassed my own classes and reimplemented methods in order to make changes suiting the subclass. But here I cannot even make the simplest reimplementation of paintCell. For example, the method, def paintCell(self,p,row,col,r,selected): QTable.paintCell(self,p,row,col,r,selected) Does this work?: def paintCell(self,p,row,col,r,selected,cg): QTable.paintCell(self,p,row,col,r,selected,cg) Maybe PyQt doesn't have the 6 arg version (it's depreciated BTW), Furthermore, I don't know how to identify the QPainter object that Qt passes. I could not find any place in the documentation that describes how to do this. In my attempt above, I created one. e... You don't need to identify anything. YOu just draw with the QPainter that you get. cheers, -- Simon Edwards | Guarddog Firewall [EMAIL PROTECTED] | http://www.simonzone.com/software/ Nijmegen, The Netherlands | ZooTV? You made the right choice. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] Aligning Text in a Table
On Saturday 28 June 2003 2:10 pm, Simon Edwards wrote: Hi, Thanks for your response. I got lost trying to follow your idea. In the past I have subclassed my own classes and reimplemented methods in order to make changes suiting the subclass. But here I cannot even make the simplest reimplementation of paintCell. For example, the method, def paintCell(self,p,row,col,r,selected): QTable.paintCell(self,p,row,col,r,selected) Does this work?: def paintCell(self,p,row,col,r,selected,cg): QTable.paintCell(self,p,row,col,r,selected,cg) Maybe PyQt doesn't have the 6 arg version (it's depreciated BTW), This was discussed on the mailing list within the last 2 weeks. Both the 6 and 7 argument variations are implemented but, because Python doesn't support function overloading, your re-implementation must handle both. In other words... def paintCell(self,p,row,col,r,selected,cg = None): if cg: QTable.paintCell(self,p,row,col,r,selected,cg) else: QTable.paintCell(self,p,row,col,r,selected) Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] C++ conversion to python, using sip
On Saturday 28 June 2003 12:53, Jonathan Gardner wrote: Python has been going in the way of merging the int and float types closer together than in C/C++ (For instance, 1/2 may equal 0.5 in the future) Yes, it's already under the What's new in Python 2.2 section of the docs, in the section entitled Changing the Division Operator. (In my docs, it's .../whatsnew/node7.html.) (1 / 2) will equal 0.5 in Python 3.0 by default, and with 'from __future__ import division' until then. From 2.2 on, the 'floor division' operator (1 // 2) gets you good old C-style integer division. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Re: [PyKDE] Distributing PyKDE programs = ./configure
On Monday 23 June 2003 08:35, Gerard Vermeulen wrote: On Sun, 22 Jun 2003 22:40:57 +0200 I admit that there is a learning curve before you can specialize distutils for special needs, If your only problem is to place images/icons/datafiles in specialized directories: this is very easy with distutils (I use it to put my docs in /usr/share/doc/PyQwt-x.x). In fact the default install-data command lets you install stuff anywhere on your system without any hacking. Thanks for the advice. I've been working on a Distutils based solution. I've now figured out subclasses to: * Check for a working PyQt and PyKDE install. * Check Qt and KDE versions. * Install kde specific data (ok it's a new install_data command that uses KDE's install prefix by default. Detects if needed). * An uninstall command. If anyone wants a copy let me know (under GPL). The code is basically all there, but it probably should catch more exceptions etc, be fully tested... cheers, -- Simon Edwards | Guarddog Firewall [EMAIL PROTECTED] | http://www.simonzone.com/software/ Nijmegen, The Netherlands | ZooTV? You made the right choice. ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde