Results 1 to 3 of 3

Thread: QListView + QFileSystemModel : create folder and edit directly

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    321
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Default QListView + QFileSystemModel : create folder and edit directly

    Hi,
    I have a QListView with QFileSystemModel using icon mode and I create a folder and edit the added folder directly when created.
    That launch correctly the edit function on the QListView item but the folder is not on the good place (sorted), and at the end of edit that's not sorted too.
    If I only create the folder, the view is refreshed correctly and the folder is on the good place (sorted).
    How have the correct behavior working ?
    Here the code actually used :
    Qt Code:
    1. if( QDir( Path ).mkdir( FolderName ) )
    2. m_DetailList->edit( Model->index( Path + '/' + FolderName ) );
    To copy to clipboard, switch view to plain text mode 
    Thanks for the help
    Last edited by Alundra; 22nd January 2015 at 00:22.

Similar Threads

  1. Replies: 0
    Last Post: 9th November 2013, 03:25
  2. Replies: 3
    Last Post: 11th December 2012, 17:32
  3. Replies: 4
    Last Post: 20th April 2011, 13:15
  4. Replies: 3
    Last Post: 26th August 2010, 09:57
  5. how use QFileSystemModel with QListView ?
    By lwifi in forum Qt Programming
    Replies: 4
    Last Post: 26th April 2010, 04:41

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
  •  
Qt is a trademark of The Qt Company.