<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Le 15/08/11 10:51, Vincent Vande Vyvre a écrit :
<blockquote cite="mid:4E48DE0D.3080108@swing.be" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
Hi, <br>
<br>
I have a strange effect with hover events and QGraphicsItem.<br>
<br>
The example below demonstrate the problem, the hover events are
emitted <br>
only on the border of the item but not on the item himsef.<br>
<br>
If I don't draw a border, events are never emitted.<br>
<br>
Platform Linux-2.6.32-33-generic-i686-with-Ubuntu-10.04-lucid<br>
Qt 4.6.2 (probably, the problem is here)<br>
Python 2.6.5<br>
PyQt 4.7.2<br>
Sip 4.10.1<br>
<br>
Regards<br>
...<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a moz-do-not-send="true" href="https://launchpad.net/oqapy">Oqapy</a>
. <a moz-do-not-send="true"
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
moz-do-not-send="true" href="https://launchpad.net/paqager">PaQager</a></div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
I found the cause of the problem, the value of alpha channel of the
background color <br>
must be greater than 127 (50%) otherwise the pixmap item is
considered as empty.<br>
<br>
But if I append setOpacity(0.3), hover events works correctly,
strange, no ?<br>
<br>
Cheers<br>
<div class="moz-signature">-- <br>
Vincent V.V.<br>
<a href="https://launchpad.net/oqapy">Oqapy</a> . <a
href="https://launchpad.net/qarte+7">Qarte+7</a> . <a
href="https://launchpad.net/paqager">PaQager</a></div>
</body>
</html>