Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QFileSystemModel::dropMimeData does not copy files?

    General and Desktop
    2
    3
    2545
    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.
    • M
      mismail last edited by

      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 Reply Quote 0
      • P
        poor_robert last edited by

        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 Reply Quote 0
        • P
          poor_robert last edited by

          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 Reply Quote 0
          • First post
            Last post