Results 1 to 2 of 2

Thread: QDir and QFile

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    May 2006
    Location
    Bangalore,India
    Posts
    235
    Qt products
    Qt3 Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 25 Times in 24 Posts

    Default Re: QDir and QFile

    sabeesh,

    Before opening the file please check
    QString fileName = m_ConfigFile.fileName();
    and check fileName contains correct path, then check that file is exist on that location.
    or
    you can check
    if(m_ConfigFile.exists ())
    {
    if (!m_ConfigFile.open(QIODevice::ReadOnly)){
    qDebug()<<"Failed to open configuration file"<<m_ConfigFile.fileName();
    }
    }

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

    sabeesh (28th September 2007)

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.