<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Il giorno 04/gen/2010, alle ore 12.54, Antonio Valentino ha scritto:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi list,<div>I' having some problem with a custom&nbsp;QGraphicsItem: the option parameter seems to contain wrong values.</div><div>Using the included test code I would expect an&nbsp;<span class="Apple-style-span" style="font-family: Menlo; font-size: 12px; ">option.levelOfDetail value of 0.5 and an&nbsp;option.exposedRect smaller than the entire item rect.</span></div><div><font class="Apple-style-span" face="Menlo">Running the following test cone on Mac OS X Snow Leopard I always get:</font></div><div><font class="Apple-style-span" face="Menlo"><br></font></div><div><font class="Apple-style-span" face="Menlo"><div>option.exposedRect PyQt4.QtCore.QRectF(0.0, 0.0, 1024.0, 1024.0)</div><div>option.levelOfDetail 1.0</div><div><br></div><div>Is it a bug?</div></font></div></div></blockquote><br></div><div>No it is a Qt API change:</div><div><br></div><div><a href="http://qt.gitorious.org/qt/qt/blobs/d16ba0a93d611689bce9a2732a1cc8c9a317f5bf/dist/changes-4.6.0#line1075">http://qt.gitorious.org/qt/qt/blobs/d16ba0a93d611689bce9a2732a1cc8c9a317f5bf/dist/changes-4.6.0#line1075</a></div><div><br></div>the trick is setting&nbsp;<span class="Apple-style-span" style="border-collapse: collapse; font-family: monospace, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 13px; white-space: pre-wrap; "><span class="typ" style="color: rgb(33, 67, 156); ">QGraphicsItem</span><span class="pun" style="color: rgb(102, 102, 0); ">::</span><span class="typ" style="color: rgb(33, 67, 156); ">ItemUsesExtendedStyleOptions</span></span><div><br></div><div><br></div><div><br></div><div>
<div>--</div><div>Antonio Valentino</div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>