[PyKDE] qt.QStyle problems on PyQt-snapshot-20050404

Phil Thompson phil at riverbankcomputing.co.uk
Fri Apr 8 14:10:33 BST 2005


On Thursday 07 April 2005 3:15 pm, Ümit Öztosun wrote:
> Hello,
>
> We are using a custom QPushButton derived widget in our application. I
> tried PyQt-x11-gpl-snapshot-20050404.tar.gz together with
> sip-snapshot-20050403.tar.gz, and I am getting "TypeError: qt.QStyle
> represents a C++ abstract class and cannot be instantiated" errors.
>
> The problem occurs when using KDE styles, i.e. 'plastik', 'highcolor'
> etc. If style is set to one of the builtin styles such as 'platinum'
> problem does not occur.
>
> Attached script demonstrates the problem; when the script is run as is
> within a KDE desktop, using a KDE-specific theme, we got the following
> error:
>
> TypeError: qt.QStyle represents a C++ abstract class and cannot be
> instantiated Traceback (most recent call last):
>   File "style_test.py", line 10, in drawButton
>     self.style().drawControl(QStyle.CE_PushButton, painter, self,
>
> On the other hand, if line 38 is uncommented out to set a built-in
> style, it works flawlessly. In both cases, using PyQt-3.14.1 and
> SIP-4.2.1 gives no errors.

Should be fixed in the next SIP snapshot.

Thanks,
Phil




More information about the PyQt mailing list