[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Use itemChange() in PyQt4
From:       Pedro Paulo <pedropaulobmjr () hotmail ! com>
Date:       2015-12-21 9:22:58
Message-ID: BLU173-W341C29FC2BDC5EDB9ADDB4D3E40 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello everybody=2C using QGraphics=2C I put a rectangle on an image and I'm=
 trying to limit it to QGraphiscsScene area when I move it with the mouse=
=2C I followed what the Qt documentation says (http://doc.qt.io/qt-5/qgraph=
icsitem.html#itemChange)=2C but when I run the code=2C it only limits the r=
ectangle on the left and upper end of the scene=2C on the right and bottom =
end=2C he continues to exceed the boundaries of the scene when I move the r=
ectangle=2C can anyone help me telling me how to limit the rectangle in all=
 areas?The code is attached=2C just run it and test it to see the problem i=
f I did not explain precisely=2C thank you. 		 	   		  =

[Attachment #5 (text/html)]

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Hello everybody, using QGraphics, I put a \
rectangle on an image and I'm trying to limit it to QGraphiscsScene area when I move \
it with the mouse, I followed what the Qt documentation says (<a \
href="http://doc.qt.io/qt-5/qgraphicsitem.html#itemChange" \
target="_blank">http://doc.qt.io/qt-5/qgraphicsitem.html#itemChange</a>),&nbsp;but \
when I run the code, it only limits the rectangle on the left and upper end of the \
scene, on the right and bottom end, he continues to exceed the boundaries of the \
scene when I move the rectangle, can anyone help me telling me how to limit the \
rectangle in all areas?</div><div>The code is attached, just run it and test it to \
see the problem if I did not explain precisely, thank you.</div> 		 	   		  \
</div></body> </html>


["code.zip" (application/zip)]
[Attachment #7 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic