[PyQt] Wrapping style classes with SIP for styling python application.

Phil Thompson phil at riverbankcomputing.com
Mon Mar 3 08:47:29 GMT 2008


On Monday 03 March 2008, Igor Prischepoff wrote:
> Hello,
> I'm trying to wrap unwrapped classes for styling my application.
> Well, seems it's not so trivial.
> I have managed successfully rebuild PyQt from sources with new wrappers for
> QCommonStyle,QMotifStyle
>
>   But when I'm trying to overload method QMotifStyle.polish for example
> my application is crushed with access violation
> class NorwegianWoodStyle(QMotifStyle):
> ...
> ...
>  def polish(self,palette):
>     print "start"
>     print "when finishing this line, app is crushing"
>  def somethingelse(self)
> ...
>
> Actually I'm converting
> ..\Qt\4.3.3\examples\widgets\styles\norwegianwoodstyle.cpp
> to python.
> I'm suspecting that there is error in my hand coded QCommonSytle or
> QMotifStyle.sip somewhere.
> May be I didn't specify some SIP annotation for some method somwhere deeep
> in class hierarchy.
> I don't have much expierience with SIP files, actually it's only 2 days :).
> So the question is:
>   Phil, can you generate those SIP files with your MetaSip package which is
> not available tо wide public
> and put them somewhere as separate package with note:
> "use on your own risk, I'm not officially supporting those files, because
> styles in Qt can be compiled like plugins and I'm not gonna supply them
> with
>
> main PyQt branch because of that, but if you brave enough than go ahead"
>
> If that's not possible than can you look at my hand coded files and tell me
> where I'm wrong?
> I will attach my files if overall effort have any sense.
> Because I spend a whole weekend ont this task but with not much success.
>
> >From time to time in mailing list I see that peoples are trying to do what
>
> I'm trying to do now:
> 'Made custom skin with python'
> I know about StyleSheets. And I have read that it's kinda slooooowww...
> So I will try to stick with overriding built in style classes and wrapping
> unwrapped classes.
>
> Sorry if I'm asking to much or if you can't (or wouldn't) do that
> I'm really appreciating you great PyQt package.

I'm not going to wrap the style classes. I'll have a quick look are your 
version if you post them.

Phil



More information about the PyQt mailing list