drag-and-drop

PySide: Drag and drop files into QListWidget

风格不统一 提交于 2020-02-20 10:39:24
问题 This is my first entry here so apologies for any newbie mistakes. I've searched both here and Google with no luck before posting. I want to be able to add images to a QListWidget, using drag and drop from a file browser. Dropping a valid file on the list widget also needs to trigger a function in the main class of my app, and pass it the image path. I found this code that does exactly that, but for PyQt4. Importing QtCore and QtGui from PySide instead of PyQt4 produces a segmentation fault

PySide: Drag and drop files into QListWidget

ε祈祈猫儿з 提交于 2020-02-20 10:38:00
问题 This is my first entry here so apologies for any newbie mistakes. I've searched both here and Google with no luck before posting. I want to be able to add images to a QListWidget, using drag and drop from a file browser. Dropping a valid file on the list widget also needs to trigger a function in the main class of my app, and pass it the image path. I found this code that does exactly that, but for PyQt4. Importing QtCore and QtGui from PySide instead of PyQt4 produces a segmentation fault

PySide: Drag and drop files into QListWidget

主宰稳场 提交于 2020-02-20 10:37:46
问题 This is my first entry here so apologies for any newbie mistakes. I've searched both here and Google with no luck before posting. I want to be able to add images to a QListWidget, using drag and drop from a file browser. Dropping a valid file on the list widget also needs to trigger a function in the main class of my app, and pass it the image path. I found this code that does exactly that, but for PyQt4. Importing QtCore and QtGui from PySide instead of PyQt4 produces a segmentation fault

How to create a custom drag shadow?

删除回忆录丶 提交于 2020-02-13 09:57:40
问题 What I want to achieve: I want to create a drag and drop functionality in Android. I'd like to use a specific layout (different from the dragged object itself) as a drag shadow. What result I'm getting instead: Neither of my approaches works as expected - I end up with no visible drag shadow at all (although the target does receive the drop). What I tried: I tried inflating the drag_item layout in the activity, then passing it as an argument to the shadow builder's constructor and inflating

How to create a custom drag shadow?

柔情痞子 提交于 2020-02-13 09:56:03
问题 What I want to achieve: I want to create a drag and drop functionality in Android. I'd like to use a specific layout (different from the dragged object itself) as a drag shadow. What result I'm getting instead: Neither of my approaches works as expected - I end up with no visible drag shadow at all (although the target does receive the drop). What I tried: I tried inflating the drag_item layout in the activity, then passing it as an argument to the shadow builder's constructor and inflating

WPF - How to disable drag and drop WITHIN a textbox control?

扶醉桌前 提交于 2020-02-06 04:27:22
问题 If you look at how textboxes appear in Windows Explorer - if you rename a file it highlights the entire text. But if you drag to select text, it will change the selection to fit the user's drag. In WPF, if you select all the text of a textbox, then drag in the text area to select text, it will try and drag & drop the text within the textbox area. I was wondering if there was a way in WPF to disable this functionality, to have it more like Windows Explorer? It's needed mostly because when

WPF - How to disable drag and drop WITHIN a textbox control?

二次信任 提交于 2020-02-06 04:27:12
问题 If you look at how textboxes appear in Windows Explorer - if you rename a file it highlights the entire text. But if you drag to select text, it will change the selection to fit the user's drag. In WPF, if you select all the text of a textbox, then drag in the text area to select text, it will try and drag & drop the text within the textbox area. I was wondering if there was a way in WPF to disable this functionality, to have it more like Windows Explorer? It's needed mostly because when

Drag and drop multiple files to Userform

做~自己de王妃 提交于 2020-02-03 17:40:07
问题 I am trying to drag and drop more than one file on a Userform to get their paths. I managed it with one file thanks to this. When I change FilePath = Data.files(1) to FilePath = Data.Files(2) or (i) , I get a message "Table Expected". Should I create a Table and Redim it? My work so far: This one does the job (opening the file and copying it into a selected sheet) Dim Wb, FilePath As String Dim WbIni, WbCib As Workbook Private Sub CommandButton2_Click() If FilePath = vbNullString Then MsgBox

MouseDown/MouseMove/Click Issues with Flex Drag and Drop

别等时光非礼了梦想. 提交于 2020-02-02 14:35:12
问题 In Flex 3, I have an ItemRenderer that has a button in it. I want users to be able to click and drag this Renderer, but also just click the button. Right now it's working with the Renderer listening on "MouseMove" to initiate drag and drop, and the button listening on "click". However this is very screwy. If somebody is dragging a scroll bar and comes anywhere near that renderer, MouseMove gets fired on the renderer and initiates dragging. (or if somebody is resizing a HDividedBox, basically

How to use actual image in preview instead of thumbnail with Dropzone.js

夙愿已清 提交于 2020-02-02 13:12:53
问题 Once uploaded, a thumbnail of the file shows up, since only gifs will be uploaded eventually, how do i get the actual gif to show in the preview, not a png thumbnail? Seen it done elsewhere but i think requires editing dropzone.js, has anyone done this here and could show me how? Thanks!! 回答1: No need to edit dropzone.js. Change its configuraiton. You can use "addedFile" of Dropzone. In addedFile function, you can get the base64 value of all files added to dropzone. Below is the code I used :