Re: [PyQt] Building multiarch on Mac OS X

2013-02-22 Thread Jeremy Sanders
On 22/02/13 15:55, Phil Thompson wrote: Have you looked at... http://pyqt.sourceforge.net/Docs/PyQt4/installation.html#ref-macos Thanks Phil - I shouldn't look for instructions on google. I however get a problem using the 10.6 SDK, but 10.7 works ok. I assume that it will still work on 10.6

[PyQt] Building multiarch on Mac OS X

2013-02-21 Thread Jeremy Sanders
s/2.7/include/python2.7 -I../../QtCore -I. -I. -F/usr/local/Trolltech/Qt-4.8.4/lib -o moc_qpycore_pyqtproxy.o moc_qpycore_pyqtproxy.cpp I assume that this is a problem? Is there any way to fix it without hacking all the qpy files? Best wishes Jeremy Sanders. ___

Re: [PyQt] multiprocessing with QApplication

2012-06-11 Thread Jeremy Sanders
Luke Campagnola wrote: > I agree with you about the multiprocessing package--I really only use it > for the ease of passing python objects between processes. (I use > multiprocessing.Pipe(), which I believe uses the Listener/Client system > you mentioned). I'll definitely try using this with subpr

[PyQt] Translation program

2012-06-02 Thread Jeremy Sanders
I've written a program to find translation strings for PyQt. It uses python's ast module to interpret python source code. It works a bit differently to pylupdate4, as it looks for functions with a fixed contexts to do the translation. If you'd like to try it out, it is available here: https://

[PyQt] Internationalisation

2011-12-12 Thread Jeremy Sanders
Hi - are most people using gettext or Qt for their internationalisation? I played with pylupdate, but it doesn't always find the strings. For instance I can't do something like def mytr(text): return QApplication.translate("myclass", text) class myclass: def __init__(self): foo = my

Re: [PyQt] Chinese characters

2011-12-03 Thread Jeremy Sanders
Tore Knabe wrote: > Hi, > > I am having trouble with Chinese characters strings. Each character itself > seems to be drawn okay, but the following character starts at the same > position, on top of the previous one. Some Chinese characters don't seem > to have that problem, but most have, especia

[PyQt] SIP/PyQt ABI breakages

2011-11-21 Thread Jeremy Sanders
Hi - I've been seeing some ABI breakages in PyQt applications (which compile against PyQt and SIP) in some Linux packages recently: e.g., https://bugzilla.redhat.com/show_bug.cgi?id=755355 https://bugs.launchpad.net/ubuntu/+source/pykde4/+bug/826321 http://groups.google.com/group/linux.debian.bug

Re: [PyQt] pyqt loading libQtGui.dylib twice on Mac OS X

2011-11-19 Thread Jeremy Sanders
Jeremy Sanders wrote: > I've had similar problems with pyinstaller, where Qt plugins don't use the > right Qt library. The otool program is great for fixing which libraries a > dylib or executable is using. I've attached a script I use for fixing > which libaries th

Re: [PyQt] pyqt loading libQtGui.dylib twice on Mac OS X

2011-11-19 Thread Jeremy Sanders
Martin Zibricky wrote: > Hi, > > I'm working on PyInstaller (www.pyinstaller.org) and recently for Mac > platform we switched from using LD_LIBRARY_PATH to use > @executable_path. > > However, the side effect is that frozen PyQt app won't run if macports > is installed. > > If I don't use code

[PyQt] Setting QVariant properties in construction

2011-10-08 Thread Jeremy Sanders
Hi - is this code supposed to work? w = QWidget() a = QPropertyAnimation(w, "maximumWidth", duration=1000, endValue=QVariant(1000)) TypeError: unable to convert a Python 'QVariant' object to a C++ 'QVariant' instance This is PyQt 4.8.3. Jeremy -- http://www.jeremysanders.net/ _

Re: [PyQt] Word wrap in QLabel - strange resizing - rephrased

2011-08-22 Thread Jeremy Sanders
Mads Ipsen wrote: > It seems strange to me though, that something like this even can be an > issue, in the sense that it haven't been fixed ages ago. But maybe it > isn't as trivial as it looks? I seem to recall it being a design issue, so it's hard to fix without breaking something else. Perhap

Re: [PyQt] Word wrap in QLabel - strange resizing - rephrased

2011-08-22 Thread Jeremy Sanders
Mads Ipsen wrote: > I've attached a small example, displaying two widgets which both include > a QLabel: one with wordwrap on, and one without. Try to resize the two > widgets and see if you can reproduce the behavior. > > This must be a bug, right? This is a fairly well known Qt bug but I can't

Re: [PyQt] QRunnable issue

2011-07-24 Thread Jeremy Sanders
Ameretat Reith wrote: > old style signal/slot works in this way. > Note: > I'm just joined in this mailing list and don't know main issue for this > topic. sorry if it's not related to main issue. :) Thanks to you both! Jeremy -- http://www.jeremysanders.net/ _

[PyQt] QRunnable and emitting signals

2011-07-22 Thread Jeremy Sanders
Hi - I'm having problems with the following code where a QRunnable emits a signal then ends. If you click the button it should print 1,2,3. It sometimes works for the first few times but the wrong number of arguments is given to the slot after that. I'm using 4.8.3 on Linux (x86). Is this a PyQt

[PyQt] QRunnable issue

2011-07-22 Thread Jeremy Sanders
Hi - I'm having problems with the following code where a QRunnable emits a signal then ends. If you click the button it should print 1,2,3. It sometimes works for the first few times but the wrong number of arguments is given to the slot after that. Is this a PyQt bug? I'm using 4.8.3 on Ubuntu

Re: [PyQt] QModelIndex.internalPointer

2011-04-25 Thread Jeremy Sanders
Hans-Peter Jansen wrote: > You miss to note your OS/Python/Qt/sip/PyQt versions in use. This is Ubuntu Maverick (pyqt 4.7.4, sip4 4.10.5). > Phil fixed some related issues in one of the latest sip/PyQt releases > (hint, hint..). Yes - I'm usually restricted to what distributions include in thei

[PyQt] QModelIndex.internalPointer

2011-04-25 Thread Jeremy Sanders
Hi - I've hit several crashes with Qt's model code with PyQt. Can someone clear up the ownership rules for objects given to QAbstractItemModel.createIndex and accessed with QModelIndex.internalPointer? I tried creating a layer of indirection when using createIndex, e.g. class Indirect(object):

[PyQt] sipdistutils.py

2011-04-21 Thread Jeremy Sanders
Hi - Would it be possible to verify the copyright owner and the license of sipdistutils.py? It doesn't have a copyright header at the top of the file. Is it copyright Giovanni Bajo and licensed under the standard SIP license? Thanks Jeremy -- http://www.jeremysanders.net/ __

Re: [PyQt] visualizing PDF files in PyQT WIndows

2011-04-18 Thread Jeremy Sanders
Gelonida G wrote: > Is there any recommended way to visualize PDF files with PyQT under > Windows? There's the poppler library, if you don't mind a GPLv2 library. There's a python interface to this http://svn.pardus.org.tr/uludag/trunk/playground/pypoppler-qt4/ (I haven't used this). There's a

Re: [PyQt] SVG Glyphs in PyQt

2010-09-15 Thread Jeremy Sanders
Kyle Covington wrote: > Anyway, my solution is providing a good workaround for the problem, I just > wanted to give the code out in case someone else was having the same > issue. > If pyqt would like an example of a cairo svg from R that didn't render I > can send one if you would like to tackle

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-29 Thread Jeremy Sanders
Phil Thompson wrote: > Are you sure you are using the latest SIP and PyQt snapshots? I was using sip 7cff86d70dc7 and pyqt 6ad3e35e67ac. I've now updated to pyqt 7088e9094087 and sip c38d259c1879 and can't seem to reproduce this problem, though it was pretty random. Was there a fix between these

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-27 Thread Jeremy Sanders
Phil Thompson wrote: > Development is finished on the next releases of PyQt, SIP and QScintilla, > so testing your favorite application against current snapshots would be a > good idea... > > Phil I seem to be getting an enormous number of "RuntimeError: underlying C/C++ object has been deleted"

Re: [PyQt] Next PyQt, SIP and QScintilla Releases

2010-08-24 Thread Jeremy Sanders
Phil Thompson wrote: > Development is finished on the next releases of PyQt, SIP and QScintilla, > so testing your favorite application against current snapshots would be a > good idea... Worked okay for me. I was trying to build PyQt to install in a non-system directory and found out that ther

Re: [PyQt] Pixel Manipulation Very Slow?

2010-08-20 Thread Jeremy Sanders
zhang jian wrote: > Just one image changed in red channel. It took about 5 seconds to redraw a > 1280 X 720 image any time I changed Kd. Far from interactive. I'd like to > know is there any way to do stuff like that faster? Or calculating a > million pixels in PyQt is just a bad idea? Any advice

Re: [PyQt] Exceptions and stack frames

2010-08-20 Thread Jeremy Sanders
Phil Thompson wrote: > Isn't this the normal behaviour? The stack frame is part of the traceback > of the exception. It will stay around until it is replaced by another > exception. > > If you add a second button to the first dialog that also raises an > exception, you should see that the __del__

[PyQt] Exceptions and stack frames

2010-08-19 Thread Jeremy Sanders
I have a problem with stack frames hanging around after exceptions in PyQt objects. A particular method on a PyQt object is connected to a signal. This method is called because of the signal is raised. If I get an uncaught exception in that method, then there appears to be a stack frame left a

Re: [PyQt] generic exception handler

2010-08-19 Thread Jeremy Sanders
Steve Borho wrote: > Is there a way to register a generic exception handler with PyQt to > catch errors that happen in signal handlers? I use a Python library > that emits 3-4 exceptions somewhat randomly for some fairly common > error conditions, and it would be nice to handle them all in one >

[PyQt] Returning a QImage instance from SIP

2010-08-16 Thread Jeremy Sanders
Hello - is this the correct way to return a QImage from a SIP MethodCode? QImage numpyToQImage(SIP_PYOBJECT, SIP_PYOBJECT, bool forcetrans = false); %MethodCode { try { Numpy2DObj data(a0); Numpy2DIntObj colors(a1); QImage *img = new QImage( numpyToQImage(data, color

Re: [PyQt] Segfault in QTextItem::font

2010-06-12 Thread Jeremy Sanders
Jeremy Sanders wrote: > #0 0x7fffef1ded48 in QExplicitlySharedDataPointer::data > (this=0x3e) > at ../../include/QtCore/../../src/corelib/tools/qshareddata.h:138 > #1 0x7fffef1d943c in QFont::QFont (this=0x1d58ac0, font=...) at > text/qfont.cpp:822 > #2

[PyQt] Segfault in QTextItem::font

2010-06-11 Thread Jeremy Sanders
Hi - I've got another segfault with the latest snapshot of qt and sip: #0 0x7fffef1ded48 in QExplicitlySharedDataPointer::data (this=0x3e) at ../../include/QtCore/../../src/corelib/tools/qshareddata.h:138 #1 0x7fffef1d943c in QFont::QFont (this=0x1d58ac0, font=...) at text/

[PyQt] Crash when adding a QRegion to a QPainterPath

2010-06-08 Thread Jeremy Sanders
Hi - I have an example program here which used to work in earlier sip/PyQt releases. Now it causes a core dump: #0 QRegion::QRegion (this=0x8f72c0, r=...) at painting/qregion.cpp:3895 #1 0x003ea5ce12ad in QPaintEngineState::clipRegion (this=) at painting/qpainter.cpp:8470 #2 0x7fff

[PyQt] QPainterPath crash

2010-06-02 Thread Jeremy Sanders
Hi - I'm getting a crash with PyQt4 on Fedora 12 on some code which used to work. This is using PyQt4-4.7.3 and sip 4.10.2. Here is a backtrace: #2 0x003e9cc6f133 in __libc_message (do_abort=2, fmt=0x3e9cd3e2f0 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/l

Re: [PyQt] returning numpy numbers in QVariant

2010-04-23 Thread Jeremy Sanders
Phil Thompson wrote: > Are numpy numbers regular ints/floats or are they a sub-class specific to > numpy? > > QVariant has been changed (over time) to make sure that no information is > lost when converting from and to the original object. So an int sub-class > will stay as a Python object and wi

[PyQt] returning numpy numbers in QVariant

2010-04-20 Thread Jeremy Sanders
Hi - some of my code has stopped working after upgrading to PyQt 4.7. It seems numbers in numpy arrays used to convert okay to QVariant types, but now they seem to produce blank results: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * import numpy class Model(QAbstractTableModel

Re: [PyQt] Qt include files on Windows

2010-02-16 Thread Jeremy Sanders
On Tue, 16 Feb 2010, Phil Thompson wrote: On Mon, 15 Feb 2010 17:22:43 + (GMT), Jeremy Sanders wrote: Hi - I see that the Windows PyQt development binaries available don't seem to include the Qt header files. These are necessary to compile PyQt Qt/SIP extension modules. Would

[PyQt] Qt include files on Windows

2010-02-15 Thread Jeremy Sanders
build extension modules based around PyQt? Thanks Jeremy -- Jeremy Sanders http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID: E1AAE053 ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputin

[PyQt] Windows PyQt binaries

2010-02-15 Thread Jeremy Sanders
Hi - I see that the Windows PyQt development binaries available don't seem to include the Qt header files. These are necessary to compile PyQt extension modules. Would it be sensible to included these in the distribution, or in an extra file, or would further files be required to build extensio

[PyQt] Problems with uiparser.py

2009-09-18 Thread Jeremy Sanders
Hi - with the latest snapshot, I'm getting an exception in uiparser.py line 404. I'm getting AttributeError: QVBoxLayout has no attribte setColumnMinimumWidth Jeremy -- Jeremy Sanders http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID

Re: [PyQt] Building PyQt on Windows

2009-09-18 Thread Jeremy Sanders
On Fri, 18 Sep 2009, Jeremy Sanders wrote: I should have tried that myself. That works fine. I now have a linker error for the SVG plugin for some reason. I had to add -lQtSvg in the link command line. I thought I had configured PyQt for SVG. Okay, this wasn't my fault. I did tell Py

Re: [PyQt] Building PyQt on Windows

2009-09-18 Thread Jeremy Sanders
On Fri, 18 Sep 2009, Phil Thompson wrote: On Fri, 18 Sep 2009 17:19:01 +0100 (BST), Jeremy Sanders wrote: What's the recommended compiler to use to compile Qt and PyQt on Windows? The free edition of Qt-4.5.2 builds very cleanly with mingw. I did a static build of Qt with mingw (gcc

[PyQt] Building PyQt on Windows

2009-09-18 Thread Jeremy Sanders
ing argument 1 of `static QString QString::fromUtf16(const ushort*, int)' This is with PyQt configured using: configure.py --consolidate -c -j 5 --enable QtCore --enable QtSvg --plugin qjpeg --plugin qtiff --pluginqgif --plugin qsvgicon Is this a supported configuration? Would it be bes

Re: [PyQt] Problem with boundingRect in PyQt snapshot

2009-09-17 Thread Jeremy Sanders
On Thu, 17 Sep 2009, Phil Thompson wrote: On Thu, 17 Sep 2009 11:39:09 +0100, Mark Summerfield wrote: On 2009-09-16, Phil Thompson wrote: On Wed, 16 Sep 2009 20:04:48 +0100, Jeremy Sanders wrote: Hi - for some reason the following code does not produce the correct answer after updating

[PyQt] Problem with boundingRect in PyQt snapshot

2009-09-16 Thread Jeremy Sanders
Hi - for some reason the following code does not produce the correct answer after updating PyQt. On Ubuntu with the PyQt 4.4.4 package the following returns 18.0 from PyQt4.QtGui import * from PyQt4.QtCore import * import sys app = QApplication(sys.argv) pix = QPixmap(128, 128) p = QPainter(p

[PyQt] Implementing a QPaintEngine

2009-09-02 Thread Jeremy Sanders
const QLineF * lines, int lineCount ) but the PyQt documentation says: QPaintEngine.drawLines (self, QLineF lines, int lineCount) Shouldn't lines be a list of QLineF objects? is this a mistake in the bindings or am I doing something wrong? Thanks Jeremy -- Jeremy San

[PyQt] Re: Deploying PyQt4 on Linux

2009-06-27 Thread Jeremy Sanders
ion vasilief wrote: > I'm trying to deploy an application ("my_app") > that uses Qt, Python, PyQt4 and SIP on Linux in a distribution > independent way (meaning that even if there are other default versions > of these libraries installed on the system, my_app will load at run > time the symbols f

[PyQt] Static Qt/PyQt on Mac OS X

2009-06-03 Thread Jeremy Sanders
Are statically linked PyQt and Qt libraries supported on Mac OS X? If so, is there a guide to building them? I'm finding it a bit of a pain to get my application packaged with py2app as it leaves out the plugins and I have to copy them in by hand and mess around with linking paths. It would be

[PyQt] RE: Catching exceptions everywhere

2009-05-08 Thread Jeremy Sanders
Igor Prischepoff wrote: > Hello, > How about that overriding > sys.excepthook ? > This code was shamelessly stolen and modified from > Eric IDE ( credits goes to author ) That's great - thanks! Jeremy -- http://www.jeremysanders.net/ ___ PyQt maili

[PyQt] Catching exceptions everywhere

2009-05-07 Thread Jeremy Sanders
Is there a way to catch Python exceptions in all parts of a PyQt program? I have a "report bug" dialog box which gets called if an exception occurs in the most frequently used parts of my program, but it would be nice if I could catch every unhandled exception globally. The really nice thing ab

[PyQt] Re: How do I intercept widget destruction?

2008-10-22 Thread Jeremy Sanders
Matt Newell wrote: > If you subclass you can override QWidget.closeEvent, QWidget.hideEvent, or > the destructor. Thanks - I tried to override closeEvent but it never seems to get called. Is there some trick? This is for a QLineEdit. Jeremy -- http://www.jeremysanders.net/ ___

[PyQt] How do I intercept widget destruction?

2008-10-22 Thread Jeremy Sanders
Hi - this may be an FAQ, but I haven't seen it. Is it possible to receive notification just before a QWidget is destroyed in Python by subclassing? I'd like to call some cleanup routines for a custom widget when it is removed from the screen. Thanks Jeremy -- http://www.jeremysanders.net/ ___

[PyQt] Re: QImage from Python buffer

2008-02-25 Thread Jeremy Sanders
Phil Thompson wrote: > Tonight's SIP snapshot will allow a Python object that supports the buffer > interface to be used whenever a char or char * is expected. No need to > rebuild PyQt. Great - thanks! -- http://www.jeremysanders.net/ ___ PyQt maili

[PyQt] Re: numpy to QImage

2008-02-24 Thread Jeremy Sanders
Tony Willis wrote: > What you want is the toQImage function that is supplied as part of > the PyQwt package. The QwtImagePlotDemo.py example included with PyQwt > uses the function in a worked example. Sure, but it would be nice to have this functionality built-in, as it seems a common use case,

[PyQt] QImage from Python buffer

2008-02-23 Thread Jeremy Sanders
Hi - Would it be possible to add support to create a QImage from a Python buffer object? I want to be able to quickly convert numpy arrays to QImages for display. Currently I have to convert the numpy to a string, then the string to a QImage. it would be nice to do QImage(numpyarray.data, 100,

[PyQt] Re: libCrun on Solaris

2007-10-08 Thread Jeremy Sanders
Ulrich Berning wrote: > INSTALL=/usr/local/bin/install \ > LINKCC="/opt/SUNWspro/bin/CC -mt" \ > CC="/opt/SUNWspro/bin/cc -mt" \ > CXX="/opt/SUNWspro/bin/CC -mt" \ > ./configure \ > --prefix=/usr/local \ > --with-cxx-main="/opt/SUNWspro/bin/CC -mt" \ > --with-threads \ > --enable-shared Thanks -

[PyQt] Re: Building on Fedora 7

2007-10-05 Thread Jeremy Sanders
Rex Dieter wrote: > Let's see if I can help make PyQt4-4.3.x happen soon first. I'll have to update my package Veusz to the Qt4 version... -- http://www.jeremysanders.net/ ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcompu

[PyQt] Re: Building on Fedora 7

2007-10-05 Thread Jeremy Sanders
Rex Dieter wrote: > Good news! the package review is (finally) finished/approved, so PyQt4 > will be making it's way into Fedora posthaste. Great! It's a shame it's not 4.3.x yet - it would be nice to actually be able to use dialog boxes created with the Qt-4.3 designer (which is shipped with Fe

[PyQt] Re: Re: Building on Fedora 7

2007-10-03 Thread Jeremy Sanders
Phil Thompson wrote: > Yes, as far as I am concerned. Linux distros continue to invent new ways > to break Qt installations. I only support the standard Qt build. Probably, but checking the licence by parsing qconfig.h is probably not the best idea, as Trolltech can change the way it is defined.

[PyQt] Re: Building on Fedora 7

2007-10-03 Thread Jeremy Sanders
Jeremy Sanders wrote: > I'll add if you work around this by modifying configure, then it cannot > find the default QMAKESPEC. There is no default directory > in /usr/share/qt4/mkspecs/ Okay, so it installs it in /usr/lib64/qt4/mkspecs/default instead. Another issue: If you give

[PyQt] Re: Building on Fedora 7

2007-10-03 Thread Jeremy Sanders
Jeremy Sanders wrote: > It appears PyQt-x11-gpl-4.3.1 is not picking up that the Qt libraries on > Fedora 7 are shared. This is with the latest qt4-4.3.1-3.fc7 package. I'll add if you work around this by modifying configure, then it cannot find the default QMAKESPEC. There is

[PyQt] Building on Fedora 7

2007-10-03 Thread Jeremy Sanders
It appears PyQt-x11-gpl-4.3.1 is not picking up that the Qt libraries on Fedora 7 are shared. This is with the latest qt4-4.3.1-3.fc7 package. It appears QT_SHARED is not defined (qtdirs does not show it). Is this a Fedora packaging bug or can PyQt work around it? The packaged qt mentions it here

[PyQt] libCrun on Solaris

2007-10-02 Thread Jeremy Sanders
Hi - I tried to compile PyQt-x1-gpl-4.3.1 under Solaris 10 with CC: Sun C++ 5.7 Patch 117830-11 2007/04/04 for Sparc. I compiled it against Qt-4.3.1. When I try to load an example PyQt program, it appears there are missing symbols: cass30:/data/store/jss/PyQt-x11-gpl-4.3.1/examples/tutorial> /

[PyQt] Re: Qt-4.3.0 hangs

2007-07-29 Thread Jeremy Sanders
Okay, here is a test python program which appears to demonstrate a hang on Ubuntu Feisty with Qt 4.3.0: import sys from PyQt4.QtCore import * from PyQt4.QtGui import * def fileOpenDialog(): fd = QFileDialog(window, 'foo') fd.exec_() # hangs before return from dialog app = QApplicatio

[PyQt] Qt-4.3.0 hangs

2007-07-26 Thread Jeremy Sanders
Has anyone noticed problems with PyQt4 apps under Ubuntu Feisty recently? It appears an Ubuntu update now makes my application hang often and reproducibly (without CPU load). I suspect it is the recent Qt4 update to qt4-4.3.0. If I strace the program, I get the following (I kill it in the end): s

[PyQt] Re: Re: [PyKDE] Re: QAbstractItemModel 64 bit problem

2007-04-06 Thread Jeremy Sanders
tural than... > > idx = a.createIndex(0, 0, id(data)) > assert idx.internalId() == id(data) > > ...and both require you to keep a reference elsewhere to data. True. I switched my code to use internalPointer when I realised it was available. I copied the examples originally, which use

[PyQt] Re: [PyKDE] Re: QAbstractItemModel 64 bit problem

2007-04-05 Thread Jeremy Sanders
now work with 64 bit python Ids? Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www-xray.ast.cam.ac.uk/~jss/ X-Ray Group, Institute of Astronomy, University of Cambridge, UK. Public Key Server PGP Key ID: E1AAE053 ___ PyQt mailing listP

[PyQt] Re: *** GMX Spamverdacht *** Re: Bug in QAbstractItemModel::createIndex()?

2007-04-05 Thread Jeremy Sanders
an happen and so far it seems I'm the only one seeing this. I had a problem on a 64 bit machine where the python ids were truncated down to 32 bit when they were handed over to Qt (see the archives of this list somewhere). Has this been fixed? Jeremy -- Jeremy Sanders <[EMAIL PROTE

[PyKDE] plugins and py2exe in PyQt4

2007-02-25 Thread Jeremy Sanders
exception? Thanks Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www-xray.ast.cam.ac.uk/~jss/ X-Ray Group, Institute of Astronomy, University of Cambridge, UK. Public Key Server PGP Key ID: E1AAE053 ___ PyKDE mailing listPyKDE@mats.imk.fr

[PyKDE] Overriding protected member functions

2006-12-31 Thread Jeremy Sanders
eView): def rowsInserted(self, parent, start, end): qt4.QTreeView.rowsInserted(self, parent, start, end) print "inserted" "inserted" is never printed when I use this class instead of QTreeView. Any ideas how to automatically expand new rows if I can do this?

[PyKDE] PyQt4.uic

2006-11-19 Thread Jeremy Sanders
Hi - On the packaged version of PyQt4 for kde-redhat (PyQt4-4.1-1.fc5), then the following line fails: from PyQt4.uic import * Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'loadUiToType' It seems /usr/lib/python2.4/site-packages

Re: [PyKDE] "sender" info in Python slot

2006-11-09 Thread Jeremy Sanders
separate reference to the BoundCaller object (hence the assignment to self), otherwise it gets garbage collected. Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID: E1AAE053 __

[PyKDE] Re: QAbstractItemModel 64 bit problem

2006-09-26 Thread Jeremy Sanders
On Tue, 26 Sep 2006, Jeremy Sanders wrote: The python Ids appear to be large integer values, e.g. 183006915920, but when they are returned from internalId(), then they come back as negative values e.g., -1676677808L, which don't even appear to match the bit pattern of the original

[PyKDE] QAbstractItemModel 64 bit problem

2006-09-26 Thread Jeremy Sanders
Hi - I have some code which doesn't appear to work on x86_64 python, but does on i386 def MyModel(qt4.QAbstractItemModel): ... def __init__(self, ...): self.objdict = {} ... def index(self, row, column, parent): """Construct an index for a child of parent

Re: [PyKDE] Model indexes and internal pointers

2006-07-19 Thread Jeremy Sanders
rrent code. In the end I directly connected the model indexes to my internal python structure. I used a weakref.WeakValueDictionary() to map the model index IDs to my internal objects. Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK

Re: [PyKDE] Crashes with QAbstractListModel?

2006-07-16 Thread Jeremy Sanders
typos). You could always do what I do: qtall.py: from PyQt4.QtCore import * from PyQt4.QtGui import * In your program: import qtall as qt4 then you can do qt4.QWidget(...), etc... Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public

[PyKDE] Qt4 QPolygon

2006-07-01 Thread Jeremy Sanders
Python lists to be passed to functions which take arrays of points? QPainter.drawLines([1,2,3,4,...]) would be very handy. I seem to remember you could do something similar with qt3 using QPointArray([1,2,3,4...]). Thanks Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]>

Re: [PyKDE] Static compilation of PyQt

2006-03-03 Thread Jeremy Sanders
On Fri, 3 Mar 2006, Phil Thompson wrote: 1. Changing the API isn't acceptable, "import qttable" must continue to work. Couldn't this simply be achieved by adding a qttable.py which does from qt import * ? Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> ht

[PyKDE] QObject::connectNotify

2005-08-23 Thread Jeremy Sanders
Hi - Is there a version of QObject::connectNotify for python signals, or a similar mechanism? I have a signal whose conditions are very expensive to calculate, so it would be better to not calculate its conditions if it is not connected. Thanks Jeremy __

Re: [PyKDE] Qt4 and uic - dynamic generation

2005-07-22 Thread Jeremy Sanders
alogBase): def foobar(self): ... Personally I think this is a lot nicer than having generated python code in my source tree. It means that someone could run a python script and it would just work, without having uic and so on installed. If this is what QWidgetFactory does, then that's great! Jeremy

[PyKDE] Qt4 and uic - dynamic generation

2005-07-21 Thread Jeremy Sanders
much nicer than having to generate Python source code. This would be like Glade in GTK. Presumably (not having looked at the uic format) this may not be very hard to do, given Python's dynamic nature. Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/

[PyKDE] Embedding PyQt apps in non-PyQt python programs

2005-05-08 Thread Jeremy Sanders
but I haven't tracked it down yet... Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID: E1AAE053 ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] Converting font names to python strings

2005-04-19 Thread Jeremy Sanders
milies: # do something I shouldn't here to check whether we have fonts installed. So as long as that works (which it appears to do), it should be okay... Cheers Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public Key S

[PyKDE] Converting font names to python strings

2005-04-19 Thread Jeremy Sanders
(): families[str(i)] = True This gives an exception: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128) I had assumed this would just work. Am I wrong? Any ideas??? Thanks Jeremy -- Jeremy Sanders <[EMAI

[PyKDE] Invalidation of windows

2005-03-20 Thread Jeremy Sanders
get round it much of the time by putting a app.eventLoop().processEvents(allevents, 10) after the popup exec_loop(). Has anyone hit this problem before? Am I doing something stupid?? Now I need to work out how to get the random maybeTip tooltip exceptions I get occassionally... Thanks Je

[PyKDE] Starting QApplication from a python thread

2005-02-05 Thread Jeremy Sanders
nd the infinite loops stops counting. Am I missing something obvious. This is with PyQt-3.13 and python-2.3.4 Thanks Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID: E1AAE053

[PyKDE] Interfacing PyQt to non-Qt python

2005-02-05 Thread Jeremy Sanders
be transported to the PyQt code). I've no idea whether the threading idea could work. Does anyone have any suggestions? Would threading work? Thanks Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/C

[PyKDE] Binding parameters to slots

2004-12-16 Thread Jeremy Sanders
connect( button, qt.SIGNAL('clicked()'), lambda button=button, self=self: self.slotTest(button) ) None of the options I've tried seem to work. Is this possible?? Thanks Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambri

[PyKDE] Veusz

2004-08-11 Thread Jeremy Sanders
) interface. Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/Cambridge, UK Public Key Server PGP Key ID: E1AAE053 ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde