<div dir="ltr">Looks like I need a little help to reimplement mouseMoveEvent in python.<br><br><br>First question: Where does the function "offset()" come from. When I try to use it in python I get an error.<br>
<br>In qabstractitemview.cpp there are a couple places where d->offset() is called. example:<br><br>topLeft = d->pressedPosition - d->offset();<br><br>I would think in python that I could rewrite this as:<br><br>
topLeft = self.pressedPositon - self.offset()<br><br>but python can't find the method "offset()". (Is this a even a qt function or is this something else. I have tried searching the Qt source and I don't see anything.<br>
<br>Second question: Is there anyway to access the private variables from within python. In the example is there any way to get to pressedPosition? If not I will also need to re-implement mousePressEvent as well. (hopfully I wont have to keep tracking back.)<br>
<br>For now I would rather not have reimplement QAbstractItemView in C++. I have very little C++ experiance and it would take me a long time to figure out where to go.<br><br>I think I might be in a little over my head, but what better way to learn (I hope).<br>
<br>-- amicits<br></div>