Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Copy-pasting items (Ctrl+C, Ctrl+X and Ctrl+V) in a QTreeView - any default implementation available?

    General and Desktop
    2
    2
    1921
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Violet Giraffe last edited by

      I've started implementing copy-paste functionality for my QTreeView descendant manually, using mimeData() and dropMimeData() methods that I have properly implemented for my model. But then I realized: since these methods are implemented, why couldn't the base QTreeView implementation handle Ctrl+C and Ctrl+V? I tried it and it doesn't seem to work, but perhaps I just need to enable this functionality same way as I have to enable drag and drop?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        AFAIK, there's no pre-made stuff for copy/paste in QTreeView

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post