Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Bill Crocker
gt; delegate the mouse was clicked. > > ________________ > From: Bill Crocker > To: > Cc: "interest@qt-project.org" > Sent: Wednesday, April 18, 2012 10:46 AMtake control of the creation of the > dragged image relative > to the Drag-Start pos(). &g

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Jason H
)); drag->setHotSpot(event->pos() - child->pos()) Because QTreeView uses delegates. I need some way to find out where in the delegate the mouse was clicked. From: Bill Crocker To: Cc: "interest@qt-project.org" Sent: Wednesday, April 18, 201

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Bill Crocker
aps the information you seek is buried in the mime data provided as part of the drop event. > > > > *From:* Bill Crocker > *To:* interest@qt-project.org > *Sent:* Wednesday, April 18, 2012 10:17 AM >

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Jason H
s the offset I am looking for. From: Bill Crocker To: interest@qt-project.org Sent: Wednesday, April 18, 2012 10:17 AM Subject: Re: [Interest] Getting QTreeView item click offset for DnD On 04/18/2012 10:07 AM, Jason H wrote: > Please, any help? > > I'm stuck. > How about

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Bill Crocker
> *From:* Jason H > *To:* André Somers ; "interest@qt-project.org" > > *Sent:* Tuesday, April 17, 2012 11:09 AM > *Subject:* Re: [Interest] Getting QTreeView item click offset for DnD > > Yes. However nothing gives me the click coordinates. > > I am dragging an

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-18 Thread Jason H
Please, any help? I'm stuck. From: Jason H To: André Somers ; "interest@qt-project.org" Sent: Tuesday, April 17, 2012 11:09 AM Subject: Re: [Interest] Getting QTreeView item click offset for DnD Yes. However nothing gives me the click coo

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread Jason H
ubject: Re: [Interest] Getting QTreeView item click offset for DnD Yes. However nothing gives me the click coordinates. I am dragging an item to a subclassed QLabel. When the drop occurs, the top-left of the item is placed at the mouse cursor. This is wrong. The item should be placed at wherever Qt dr

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread Jason H
. From: André Somers To: "interest@qt-project.org" Sent: Tuesday, April 17, 2012 11:00 AM Subject: Re: [Interest] Getting QTreeView item click offset for DnD Op 17-4-2012 16:54, Jason H schreef: Well I am confused about how the view works.

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread André Somers
omers *To:* interest@qt-project.org *Sent:* Tuesday, April 17, 2012 10:40 AM *Subject:* Re: [Interest] Getting QTreeView item click offset for DnD Op 17-4-2012 16:35, Jason H schreef: I need to repeat this. I'm still lost. here is my code (child is always NULL): voidDataPointTreeView::mous

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread Jason H
exWidget anywhere? If not, perhaps you should check what indexWidget() actually returns? André > > From: Jason H >To: Interests Qt >Sent: Friday, April 13, 2012 12:04 PM >Subject: [Interest] Getting QTreeView item click offset for DnD > >

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread André Somers
not, perhaps you should check what indexWidget() actually returns? André *From:* Jason H *To:* Interests Qt *Sent:* Friday, April 13, 2012 12:04 PM *Subject:* [Interest] Getting QTreeView item click offset for DnD I n

Re: [Interest] Getting QTreeView item click offset for DnD

2012-04-17 Thread Jason H
pos())); if(!child) return; m_dragOffset=event->pos()-child->pos(); } From: Jason H To: Interests Qt Sent: Friday, April 13, 2012 12:04 PM Subject: [Interest] Getting QTreeView item click offset for DnD I need to drag model items from a QTreeView to

[Interest] Getting QTreeView item click offset for DnD

2012-04-13 Thread Jason H
I need to drag model items from a QTreeView to a widget and make the item appear in the widget at the right spot. I have it working except that the drop is not exact. It is off by where the user clicked in the QStandardItem. I need to figure out how to get that click offset (i.e. QPoint(50,10)) a