Results 1 to 3 of 3

Thread: file not writing

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Smile file not writing

    I am just trying to write a file...but its not writing can u check whats wrong in this. the file should be generated in my current directory but there's no file generated.

    Qt Code:
    1. QFile file("resumePDF.dat");
    2.  
    3. if(!file.open(QFile::WriteOnly))
    4. console->mainwindow->statusBar()->showMessage(tr("file resumePDF.pdf cannot be opened for writing !!!"),5000);
    5. QTextStream out(&file);
    6. out << "My name is Sujan Dasmahapatra" << "\n";
    7. file.close();
    To copy to clipboard, switch view to plain text mode 
    Last edited by Lykurg; 25th October 2011 at 22:37. Reason: missing [code] tags

Similar Threads

  1. Writing to a txt file
    By nagabathula in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2011, 11:59
  2. Writing a XML file
    By Djony in forum Qt Programming
    Replies: 7
    Last Post: 5th February 2007, 16:23
  3. Writing to file at specific
    By safknw in forum Qt Programming
    Replies: 3
    Last Post: 1st December 2006, 11:12
  4. XML file writing
    By mbjerkne in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2006, 19:04
  5. Writing an XML file
    By qball2k5 in forum Qt Programming
    Replies: 9
    Last Post: 19th March 2006, 10:58

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.