[PyQt] Re: QStyle manipulations
phil at riverbankcomputing.com
Mon Jul 27 17:44:43 BST 2009
On Mon, 27 Jul 2009 18:40:18 +0200, "Hans-Peter Jansen" <hpj at urpla.net>
> 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
> 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
> 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
> 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
> as a pyqt slot?
More information about the PyQt