The answer seems to be that I should have used self.itemAt(e.scenePos()) instead of self.itemAt(e.pos()). I found this in this SO question.

I note here that the reason I've been having trouble finding information on this issue is that moving QGraphicsItems around in a QGraphicsScene is not what Qt calls "drag and drop". To search for information on this topic you want to search for things like "move QGraphicsItem".

Why does itemAt() not always find QGraphicsItem
I cannot get jQuery UI working in my ASP.NET MVC4 application. I tried dialog and datepicker.
Here is part of the code of my view.

&lt;link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="../../Scripts/jquery-1.5.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="../../Scripts/jquery-ui-1.8.11.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script language="javascript" type="text/javascript"&gt;
$(document).ready(function () {
    alert('A');
    //$('#datepicker').val('test');
    $('#datepicker').datepicker();
    alert('B');
});
&lt;/script&gt;
&lt;h1&gt;Test&lt;/h1&gt;
&lt;form id="testForm" action="#" method="get"&gt;
    &lt;input type="text" id="datepicker" name="datepicker" class="datepicker" /&gt;
&lt;/form&gt;


The alert A is displayed. When I uncomment the next row, the value test is assigned. But datepicker is not working and alert B does not display.

Thanks,
Petr
