Results 1 to 4 of 4

Thread: Append file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    97
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Append file

    Hi,

    I have a file called database.h having following content.

    Qt Code:
    1. [I]===========================================================
    2. #ifndef DATABASE_H
    3. #define DATABASE_H
    4.  
    5. #include <QtCore>
    6. #include <QtSql>
    7. class database
    8. {
    9. public:
    10. database();
    11. bool connectDB();
    12.  
    13. private:
    14. };
    15.  
    16. #endif // DATABASE_H
    17. ========================================================[/I]
    To copy to clipboard, switch view to plain text mode 

    Now I want to append some text in this file after finding some phrase in this.

    e.g. after all #include lines I want to add #include <QtGui>
    or
    after private: string I want to add QSqlQuery qry;

    How to achieve this using seek() function?

    Thanks in advance

    Manish
    Last edited by high_flyer; 10th February 2011 at 08:27. Reason: code tags

Similar Threads

  1. How do I append and int to my QString?
    By seink in forum Newbie
    Replies: 3
    Last Post: 31st May 2015, 21:45
  2. Append to a XML Document
    By Goldmmbr in forum Qt Programming
    Replies: 0
    Last Post: 16th November 2009, 15:03
  3. Cannot append to QFile using QIODevice::Append
    By philwinder in forum Qt Programming
    Replies: 4
    Last Post: 17th November 2008, 09:09
  4. QVector - Append
    By krishbhala in forum Qt Programming
    Replies: 1
    Last Post: 20th December 2007, 10:50
  5. QTextEdit::append help
    By tho97 in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2007, 07:10

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.