Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Copy-pasting items (Ctrl+C, Ctrl+X and Ctrl+V) in a QTreeView - any default implementation available?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k Views
  • 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 Offline
    V Offline
    Violet Giraffe
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved