[PyQt] Re: QStyle manipulations
Hans-Peter Jansen
hpj at urpla.net
Mon Jul 27 17:40:18 BST 2009
Am Montag, 27. Juli 2009 schrieb Hans-Peter Jansen:
> Am Montag, 27. Juli 2009 schrieb Hans-Peter Jansen:
> >
> > Next you find a test script simply intercepting this slot, but while
> > the constructor of PlastiqueStyle is being called correctly, the slot
> > is not :-(.
> >
For what is worth, here's an updated version of the test script, that
depends on the former q*style.sip files included in your PyQt installation.
I've still no idea, why the layoutSpacingImplementation() slot is not
called, but this script proves, that both PM_LayoutHorizontalSpacing and
PM_LayoutVerticalSpacing do return -1, which is prerequisite for Qt to call
this slot.
My theory is, that this paragraph is the culprit:
About QStyle::layoutSpacing():
For binary compatibility reasons, this function is not virtual. If you want
to specify custom layout spacings in a QStyle subclass, implement a slot
called layoutSpacingImplementation(). QStyle will discover the slot at
run-time (using Qt's meta-object system) and direct all calls to
layoutSpacing() to layoutSpacingImplementation().
Phil, could it be, that Qt isn't able to discover the slot being available
as a pyqt slot?
BTW, did somebody in the kind audience ever came across
QSqlDriver.subscribeToNotificationImplementation() and used it for some
reason? It seem to use similar mechanisms?
Thanks,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: styletest.py
Type: application/x-python
Size: 5239 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090727/6c09f2dc/styletest.bin
More information about the PyQt
mailing list