Results 1 to 4 of 4

Thread: QDir

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 47 Times in 43 Posts

    Default Re: QDir

    Qt Code:
    1. if(!name.isEmpty())
    2. return ;
    3. model->mkdir(index,name);
    To copy to clipboard, switch view to plain text mode 


    if(!name.isEmpty())
    this should be like this
    if(name.isEmpty()).

    When the name is not empty, you need to create the folder.

    you need to remove the ! before name. isEmpty will return true when the string is empty.


    hope it helps,
    bala

  2. The following user says thank you to BalaQT for this useful post:

    smemamian (2nd April 2013)

Similar Threads

  1. QListView and QDir
    By Yayati.Ekbote in forum Qt Programming
    Replies: 5
    Last Post: 26th March 2010, 11:45
  2. QDir mkpath
    By yazwas in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2009, 21:21
  3. Help with QDir model
    By allstar in forum Qt Programming
    Replies: 1
    Last Post: 15th December 2007, 15:31
  4. QDir Subclassing
    By Oleg in forum Qt Programming
    Replies: 9
    Last Post: 31st October 2007, 12:03
  5. Is it me or QDir?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 23:06

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