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

Ümit Öztosun umit.oztosun at gmail.com
Thu Apr 7 15:15:15 BST 2005


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.

Best Regards,
Umit Oztosun

---
Debian Testing on i386,
PyQt-x11-gpl-snapshot-20050404
sip-snapshot-20050403
qt3-mt 3.3.3
python 2.4




More information about the PyQt mailing list