Results 1 to 6 of 6

Thread: What's the best solution for making a "virtual folder list"

  1. #1
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default What's the best solution for making a "virtual folder list"

    I'm making now an application that the user can save their maps and create folders and arrange it like they want.

    I'm using the normal directories with a "mapdir.xml" that contains that it's a valid map virtual folder and the number of valid maps and subdirectories. So, everything that the user do with the application to move, rename, delete or add, I'll create, delete, rename or move a directory or file. The maps has two files, "mapname.map" and "mapname.xml".

    edit: The user is viewing the "valid" directories and files in a QTreeWidget, is there a better way to show these items ?

    edit (again): I've just noticed while moving "big" directories makes there's a delay to update the items.

    Is there a better way for doing this instead of using normal directories with "map format" ?

    I've thinking about using SQL but I never used it, I can do it with this ?
    Is there another good solution ?
    Last edited by rsilva; 8th May 2011 at 14:34.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: What's the best solution for making a "virtual folder list"

    There are plenty of solutions you might use. In the end you'll have to do some mapping between your virtual stucture and the real filesystem but from the application point of view you can implement any possible model, even one based on QMap or something similar.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What's the best solution for making a "virtual folder list"

    Quote Originally Posted by rsilva View Post
    edit (again): I've just noticed while moving "big" directories makes there's a delay to update the items.

    Is there a better way for doing this instead of using normal directories with "map format" ?

    I've thinking about using SQL but I never used it, I can do it with this ?
    Is there another good solution ?
    You should check what is really causing the problem, before you think about a solution
    Last edited by nightghost; 9th May 2011 at 09:10. Reason: spelling corrections

  4. #4
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What's the best solution for making a "virtual folder list"

    I'm not thinking to change it about the problem, I want to optimize it. Make faster and avoid some things that can cause problems.

  5. #5
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: What's the best solution for making a "virtual folder list"

    Isn't your problem, that your program is to slow? In order to optimize it you should first find the bottleneck, before you start. Maybe your data structures are the problem, but it can also be the slow file I/O or the wrong configuration of the tree, or...

  6. #6
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What's the best solution for making a "virtual folder list"

    It's normal, only gets slow if moving big directories, but it's normal to slow in moving too much things in the filesystem.

    But, I'm trying to avoid letting the entire tree in a directory. And trying to improve how the user interacts with it, like using treeWidget or changing to something faster or better to navigate.

Similar Threads

  1. Replies: 1
    Last Post: 12th October 2010, 14:43
  2. Replies: 8
    Last Post: 5th August 2008, 12:09
  3. Qmake DLLDESTDIR, Visual Studio "clean solution"
    By SiLiZiUMM in forum Installation and Deployment
    Replies: 4
    Last Post: 18th March 2008, 12:14
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Tags for this Thread

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.