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. QFileSystemModel::dropMimeData does not copy files?

QFileSystemModel::dropMimeData does not copy files?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k 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.
  • M Offline
    M Offline
    mismail
    wrote on last edited by
    #1

    Hi all,

    I'm trying to copy files using
    @m_fileSystemModel->dropMimeData(QApplication::clipboard()->mimeData(), Qt::CopyAction, 0, 0, qobject_cast<QAbstractItemView *>(focus)->rootIndex());@

    but this function always return false which means that the file is not copied, note that this function works perfectly if i passed

    Qt::MoveAction

    I'm using Windows.
    Can any body help, please?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      poor_robert
      wrote on last edited by
      #2

      Hello,

      I have very similar problem too .
      I use method:
      @bool QFileSystemModel::dropMimeData ( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent )@

      to copy/move files and directories. It works in all cases (copy/move single files and moving directory) except copying directories from one location to another (names are unique).

      I have no idea what's wrong...

      1 Reply Last reply
      0
      • P Offline
        P Offline
        poor_robert
        wrote on last edited by
        #3

        I have noticed that there are some differences between source files in Qt versions. I'm using Qt 4.8.2 under Linux.

        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