Inkcut
search
  • chevron_right Threads
  • label General

Help with adding drag and drop support.

R0NAM1
Feb. 14, 2022
chat_bubble_outline 1
  • link
    R0NAM1
    Members 1 post
    Feb. 14, 2022, 8:33 p.m. Feb. 14, 2022, 8:33 p.m.
    link

    I'm currently trying to add drag and drop support, although being unfamiliar with QT in general and Enaml. I've determined that I need to somehow add the ability to the plot_view to see a dragged and dropped file and produce a URL / file path to it (Example, drag and drop /home/user/Desktop/design.svg, which would return that path.) Then call open_document (inkcut/job/manifest.enaml) to open that file. From what I have been able to see however, I cannot take QtPlotView and apply any sort of drag and drop to it, any help on how to do this?

    github.com/inkcut/inkcut/issues/329

  • link
    frmdstryr
    Team 127 posts
    Feb. 18, 2022, 3:59 a.m. Feb. 18, 2022, 3:59 a.m.
    link

    Did you look at the exanple here: enaml.readthedocs.io/en/latest/examples/ex_drag_and_drop.html

    The file is opened using a workbench command with the file path in github.com/inkcut/inkcut/blob/master/inkcut/job/manifest.enaml#L159

arrow_upward Go to top
  • Privacy policy
powered by misago