drag-and-drop

Qt: best way to delegate a drag and drop to children

落爺英雄遲暮 提交于 2019-12-12 15:55:12
问题 I'm using drag and drop on QWidget, I have reimplemented dragEnterEvent, dragLeaveEvent, dragMoveEvent and dropEvent, and that works well. In my QWidget, I have other QWidget children, and I want them to manage drag and drop too. The issue is my parent QWidget catch the dnd events, so my children don't get it. What is the best way to say "when you are above a child widget, the child get the dnd events" ? Thanks Edit: my widgets looks like this: ---------------------------------------- |

How to Drag and Drop Custom Widgets?

China☆狼群 提交于 2019-12-12 15:44:40
问题 I have created my own custom widget and I want to support internal drag and drop for the widgets. I have added 4 of my custom widgets in a vertical box layout. Now i want to drag and drop the custom widgets internally. To be more clear, If i drag the last widget and drop it in the first position, then the first widget has to move to the second positon and the last widget (which is dragged) has to move to first position. (same like drag and drop of the items in the List view). Can anyone

Drag from JQGrid to jsTree v.0.9.9a

丶灬走出姿态 提交于 2019-12-12 14:24:29
问题 I am looking to drag a row from the jqGrid I have created and fire a drop event on a node in the jsTree (v.0.9.9a). Is there anyway to do this - using v.0.9.9a of the jsTree only. Regards. 回答1: This is a really narrow question. It sounds like both controls use the jQuery UI draggable and droppable widgets, and that you have a preliminary approach. Why not try implementing your idea and see how well it works? I would encourage you to post your code when you are done, or if you get stuck along

callback when dragging annotation

拈花ヽ惹草 提交于 2019-12-12 13:33:28
问题 I can drag my annotation and when I drop it I can read the position. However, I need to constantly update my title with the position I'm dragging. I've tried with adding a UIPanGestureRecognizer but that doesn't work when I dragging the annotation. What method shall I use to get constantly calls back to my code while dragging an annotation? -(void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view didChangeDragState:(MKAnnotationViewDragState)newState fromOldState:

How to .setData/.getData when using jQuery's .trigger('dragstart') for HTML5's drag and drop functionality

て烟熏妆下的殇ゞ 提交于 2019-12-12 13:24:11
问题 When using jQuery's .trigger('dragstart') to fire off a function on an element with the attribute ondragstart="drag(event)" , how do you .setData/.getData for HTML5's drag and drop on touch device?** Example flow: User drags element with touchmove event element the two following attributes: .bind('touchmove', function(event){$(this).trigger('dragstart');}); ondragstart="drag(event)" the drag(event) attempts to use event.dataTransfer.setData("Text", event.target.id); the result is the

How to use jQuery UI

怎甘沉沦 提交于 2019-12-12 13:07:54
问题 I was trying to learn jQuery drag and drop using the fiddle. Though I am new to jQuery, I am so confused with jQuery and jQuery UI. What else do I need to install? I have installed jquery-1.6.3.js and jquery-ui.1.8.16.js. But it's not running. How can I make it run? The code is: <p class="section">Drag and Drop</p> <script type="text/javascript" src="/js/jquery-1.6.3.js"></script> <script type="text/javascript" src="/js/jquery-ui.1.8.16.js"></script> <script type="text/javascript"> $('

Explorer doesn't release IDataObject when doing a drag/drop

你说的曾经没有我的故事 提交于 2019-12-12 12:29:39
问题 I'm implementing drag-and-drop in my application. I'm having a problem with Windows Explorer not releasing my IDataObject after a drag-and-drop operation. To isolate the problem, I've implemented a very simple drag-and-drop source that should compile in most any Win32 compiler. The data object contains no data; as you can see everything is very simple. The data object contains tracing that can be viewed with DebugView to indicate when it is created and when it is destroyed. To reproduce:

Drag and Drop control for Silverlight

安稳与你 提交于 2019-12-12 12:17:56
问题 Recently I needed to add drag & drop functionality to a Silverlight application. Can anyone recommend a good drag & drop control? 回答1: I created a Drag/Drop controller that I think works really well. I have been using this technique for a while, and I have been very happy with it. http://houseofbilz.com/archive/2009/02/10/drag-and-drop-with-silverlight.aspx 回答2: Here is a link to the best one I have found so far: http://nickssoftwareblog.com/2008/10/07/silverlight-20-in-examples-part-drag-and

Drag-n-drop with QWindow

拟墨画扇 提交于 2019-12-12 11:53:16
问题 I have custom QWidget that contains custom QWindow . QWindow with OpenGL is used as a "connector" between render framework and Qt application. Mouse and keyboard events are handled with overriding QWindow methods. Pseudo-code: class MyWindow : public QWindow { public: MyWindow : QWindow() { /* GL stuff init*/ } protected: // mouse/keyboard event handling // expose event handling // resize event handling // ... }; class MyWidget : public QWidget { public: MyWidget : QWidget() { auto window =

Disable mousemove on click

本秂侑毒 提交于 2019-12-12 11:47:11
问题 I'm experimenting on a drag 'n' drop, this is my code here: $('.box-title').live('mousedown click', function(e) { var self = $(this); var Box = self.parent('#box'); if(e.type == 'mousedown') { $(window).mousemove(function(e) { Box.css({ cursor: 'move', top: e.pageY - 15, left: e.pageX - 125 }); }); } else if(e.type == 'click') { Box.css({ cursor: 'default', top: e.pageY - 15, left: e.pageX - 125 }); } }); On mousedown, it should initiate the dragging effect by moving the mouse, after that if