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. QTreeView(QFileSystemModel) doesn`t update after drag and drop MoveEvent

QTreeView(QFileSystemModel) doesn`t update after drag and drop MoveEvent

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.7k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    km22
    wrote on last edited by
    #1

    Hello,
    I have a QTreeView with QFileSystemModel. I want to use Drag and Drop to MOVE Directories to another Parent.
    Directory moves as expected when i look in explorer, but the QTreeView doesn`t update correctly.
    After drop QTreeView hides only icon of source node, but the node itself is still there. The droped folder is not visible in destination parent.
    Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt and OS are you running ?

      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
      • K Offline
        K Offline
        km22
        wrote on last edited by
        #3

        Hello !
        I'm on Win 7 Qt 5.5.
        I think it is a Netzwork path problem.
        For example :

        QFileSystemModel model;
        model.setRootpath("D:/Folder"); //WORKS !
        model.setRootpath("//Computername/Folder"); //DOESN`T WORK !
        

        Of course, i have all right for this folder.
        If i have a absolute local path, QTreeView updates correct !
        Networkpath doesn`t work.

        jsulmJ 1 Reply Last reply
        0
        • K km22

          Hello !
          I'm on Win 7 Qt 5.5.
          I think it is a Netzwork path problem.
          For example :

          QFileSystemModel model;
          model.setRootpath("D:/Folder"); //WORKS !
          model.setRootpath("//Computername/Folder"); //DOESN`T WORK !
          

          Of course, i have all right for this folder.
          If i have a absolute local path, QTreeView updates correct !
          Networkpath doesn`t work.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @km22 From documentation:
          "The QFileSystemModel class provides a data model for the local filesystem"
          I think "local filesystem" means only local file system, no network.
          Maybe if you map that path to a drive letter it will work?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • K Offline
            K Offline
            km22
            wrote on last edited by
            #5

            Sure. Thank you jsulm!
            I havn`t seen that.

            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