Results 1 to 5 of 5

Thread: move folders in QDirModel

  1. #1
    Join Date
    Mar 2008
    Posts
    141
    Thanks
    10
    Thanked 9 Times in 9 Posts

    Default move folders in QDirModel

    Hi,

    I have a QDirModel and a QTreeView. I have enabled drag/drop actions and the model is not readOnly. I can move the files around (internal move - drag/drop) but I can not drop the folders (allthough I can drag the folders and I even get a positiv dropindicator). Does anyone know why? Do I have to subclass QDirModel?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: move folders in QDirModel

    You have to look into our wiki and use search more extensively

  3. #3
    Join Date
    Mar 2008
    Posts
    141
    Thanks
    10
    Thanked 9 Times in 9 Posts

    Default Re: move folders in QDirModel

    Hi,

    I searched web and forum and could not find anything ... Do you mean the "Extended Dir View example" in the Wiki? But how to drag/drop folders within the treeview is not covered there afair. Please, give me a hint :-)

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: move folders in QDirModel

    I think it is covered there, only that it is described using a listview, but it's exactly the same with a treeview. If dropping folders doesn't work, you should check permissions and also try dropping in Move mode and not Copy mode.

  5. #5
    Join Date
    Mar 2008
    Posts
    141
    Thanks
    10
    Thanked 9 Times in 9 Posts

    Default Re: move folders in QDirModel

    Hi,

    I built the example in the wiki but i cant move (drag yes but no drop) folders there as well. In my code I use as dragDropMode InternalMove and on Windows I have all permissions ... any idea?

Similar Threads

  1. QDirModel and QTreeView cut and paste
    By Micawber in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 20:16
  2. Move and resize with layout
    By waediowa in forum Qt Programming
    Replies: 0
    Last Post: 14th May 2008, 08:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.