<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:11pt;font-family:Bitstream Vera Sans Mono">
<p>Am Montag, 23. Oktober 2006 18:22 schrieb Hans-Peter Jansen:</p>
<p>> Am Sonntag, 22. Oktober 2006 23:32 schrieb Hans-Peter Jansen:</p>
<p>></p>
<p>> Update: to avoid the SC_All value for the sub parameter, I added:</p>
<p>></p>
<p>> sub = QStyle.SC_SpinWidgetUp | QStyle.SC_SpinWidgetDown |</p>
<p>> QStyle.SC_SpinWidgetFrame | \ QStyle.SC_SpinWidgetEditField |</p>
<p>> QStyle.SC_SpinWidgetButtonField</p>
<p>></p>
<p>> and use this value, which in theory should do the right thing.</p>
<p>></p>
<p>> Unfortunately, it leads to the earlier mentioned core dump with an</p>
<p>> interesting back trace:</p>
<p>></p>
<p>> The question is, why the heck does paintEvent call into</p>
<p>> QSpinWidget::buttonSymbol at all? At least, I wouldn't expect this, but</p>
<p>> may be it's due to some self.style().drawComplexControl() side effect?</p>
<p></p>
<p>Found it. Inside drawComplexControl(), whereever it is implemented, it accesses the QSpinWidget to check, which button symbols to paint, and that's where it crashes. This is the first time, where I got stuck in such a way, it looks like it cannot be solved on the python side of PyQt (well, at least not without giving up consistent visual appearance by implementing the QSpinWidget button paint with primitive elements, or suffering big pains by subclassing QSpinBox and trying to override most functionality..)</p>
<p></p>
<p>The whole issue is triggered by the unfortunate relationship of QSpinBox with the int based QRangeControl, which is simply too limited for medium sized decimal values (at least on 32 bit cpus), since they must be mapped to the int range.</p>
<p></p>
<p>If anybody has more ideas, what can be done, I'm open for suggestions..</p>
<p></p>
<p>Pete</p>
</body></html>