[PyQt] Wrapping style classes with SIP for styling python
application.
Igor Prischepoff
igor at tyumbit.ru
Fri Mar 7 07:40:33 GMT 2008
Hello,Phil.
> You should extend the %ConvertToSubClassCode in qapplication.sip to
> include the new classes as they are QObject sub-classes.
I have implemented this hint but it didn't helped to fix crash in polish()
method.
I just added 2 lines in ConvertToSubClassCode section and changed QStyle
line in qapplication.sip :
...
{sipName_QCommonStyle, &sipClass_QCommonStyle, 125, 125},
{sipName_QMotifStyle, &sipClass_QMotifStyle, -1, -1},
};
I was wandering what the meaning of 'yes','no' ints in class_graph structure
then i've guessed that it's here for hierarchy links.
So let's check
QCommonStyle is a child of QStyle
here is how my _modified_ QStyle looks like:
{sipName_QStyle, &sipClass_QStyle, 124, 21}, // 124
points to added to end of array QCommonStyle descriptor
and QCommonStyle 125 points to QMotifStyle which have -1,-1 descriptor
because he is last child in hierarchy in our case.
Is that right?
I've compiled overall setup and crash is still here...
What else can i do about it?
Please note that in attached archive i have sample 'test_style.py' which
crashed on officially wrapped QStyle class.
So clean vanilla pyqt crashed with QStyle wrapped if only to reimplement
polish() method!
I think this is not normal and expected behaviour.
Can you check that on you pyqt setup?
Zip archive is attached.
Can you enlighten me on this subject once more please?
my environment: windows xp, qt 4.3.3. pyqt 4.3.3-2 opensource,python 2.5
Igor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: styling.zip
Type: application/octet-stream
Size: 10246 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080307/9d23772c/styling-0001.obj
More information about the PyQt
mailing list